aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2013-03-26 10:57:06 -0500
committerJack Nagel2013-03-26 12:58:46 -0500
commitb9765cba6b7c0aa5c5958950d6f3587e6a0398ab (patch)
tree2d04e13b77c714ad2bae1577367203ddf45c2bd6 /Library/Formula
parentf43c0a06745c07c88e6e0b76b2e0ef9cd3b97689 (diff)
downloadhomebrew-b9765cba6b7c0aa5c5958950d6f3587e6a0398ab.tar.bz2
sflowtool: improve test
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/sflowtool.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Formula/sflowtool.rb b/Library/Formula/sflowtool.rb
index ddb8fee17..fc9726e58 100644
--- a/Library/Formula/sflowtool.rb
+++ b/Library/Formula/sflowtool.rb
@@ -13,7 +13,10 @@ class Sflowtool < Formula
system "make install"
end
- def test
- system "#{bin}/sflowtool -h 2>&1 | grep version"
+ test do
+ require 'open3'
+ Open3.popen3("#{bin}/sflowtool", "-h") do |_, _, stderr|
+ /sflowtool version: #{Regexp.escape(version)}/ === stderr.read
+ end
end
end