aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-03-24 23:59:52 -0500
committerJack Nagel2013-03-26 00:02:30 -0500
commitca248735460841a2dfeb5bf1375dc3ec871a170f (patch)
treebe73861c746ca648bad26850fac47f3e6bc36a95 /Library/Formula
parentab522c611fea17a294939c04edd9a439aa00f2c6 (diff)
downloadhomebrew-ca248735460841a2dfeb5bf1375dc3ec871a170f.tar.bz2
cbmbasic: improve test
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/cbmbasic.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Formula/cbmbasic.rb b/Library/Formula/cbmbasic.rb
index f13b9a18b..591ebb825 100644
--- a/Library/Formula/cbmbasic.rb
+++ b/Library/Formula/cbmbasic.rb
@@ -10,7 +10,11 @@ class Cbmbasic < Formula
bin.install 'cbmbasic'
end
- def test
- system "echo \"PRINT 1\" | #{bin}/cbmbasic"
+ test do
+ IO.popen("#{bin}/cbmbasic", "w+") do |pipe|
+ pipe.write("PRINT 1\n")
+ pipe.close_write
+ /READY.\r\n 1/ === pipe.read
+ end
end
end