aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-03-24 23:29:37 -0500
committerJack Nagel2013-03-26 00:02:29 -0500
commitecdde2f80db5527082a4a40fe44a47ad2133c9e3 (patch)
treec96a1be7997a97a6c0660664278daeeb5987f898 /Library
parent1b6ec51e66ba1873ae8f5e7235f2c1e11528dd6f (diff)
downloadhomebrew-ecdde2f80db5527082a4a40fe44a47ad2133c9e3.tar.bz2
cloog: fix test
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/cloog.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Formula/cloog.rb b/Library/Formula/cloog.rb
index 7b094daac..13329b1b5 100644
--- a/Library/Formula/cloog.rb
+++ b/Library/Formula/cloog.rb
@@ -16,7 +16,7 @@ class Cloog < Formula
system "make install"
end
- def test
+ test do
cloog_source = <<-EOS.undent
c
@@ -33,8 +33,11 @@ class Cloog < Formula
0
EOS
- pipe = IO.popen("cloog /dev/stdin", "w+")
- pipe.write(cloog_source)
- pipe.read =~ /Generated\ from \/dev\/stdin\ by\ CLooG/
+ require 'open3'
+ Open3.popen3("#{bin}/cloog", "/dev/stdin") do |stdin, stdout, _|
+ stdin.write(cloog_source)
+ stdin.close
+ /Generated from \/dev\/stdin by CLooG/ === stdout.read
+ end
end
end