diff options
Diffstat (limited to 'Library/Formula/enscript.rb')
| -rw-r--r-- | Library/Formula/enscript.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/enscript.rb b/Library/Formula/enscript.rb index 21b9d40cf..186f68f07 100644 --- a/Library/Formula/enscript.rb +++ b/Library/Formula/enscript.rb @@ -18,7 +18,10 @@ class Enscript < Formula system "make install" end - def test - system "#{bin}/enscript -V | grep 'GNU Enscript #{version}'" + test do + require 'open3' + Open3.popen3("#{bin}/enscript", "-V") do |_, stdout, _| + /GNU Enscript #{Regexp.escape(version)}/ === stdout.read + end end end |
