2011-11-04 15:32:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Cbmbasic < Formula
|
|
|
|
homepage 'http://cbmbasic.sourceforge.net/'
|
|
|
|
url 'http://downloads.sourceforge.net/project/cbmbasic/cbmbasic/1.0/cbmbasic-1.0.tgz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '54564daa7f28be98b03ae7dd1eece9e5439c95c3'
|
2011-11-04 15:32:45 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "make", "CFLAGS=#{ENV.cflags}", "LDFLAGS=#{ENV.ldflags}"
|
|
|
|
bin.install 'cbmbasic'
|
|
|
|
end
|
|
|
|
|
2013-03-25 04:59:52 +00:00
|
|
|
test do
|
|
|
|
IO.popen("#{bin}/cbmbasic", "w+") do |pipe|
|
|
|
|
pipe.write("PRINT 1\n")
|
|
|
|
pipe.close_write
|
2013-06-09 02:26:18 +00:00
|
|
|
assert_match /READY.\r\n 1/, pipe.read
|
2013-03-25 04:59:52 +00:00
|
|
|
end
|
2011-11-04 15:32:45 +00:00
|
|
|
end
|
|
|
|
end
|