diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/cloog.rb | 11 |
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 |
