aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_utils.rb
diff options
context:
space:
mode:
authorJack Nagel2014-07-05 13:50:54 -0500
committerJack Nagel2014-07-05 13:50:54 -0500
commit6833266bb0bfbc7628026176bd54ebd998e663d4 (patch)
treed824cee1766f353dafb6e2ec3e552da73dbbdf0d /Library/Homebrew/test/test_utils.rb
parentff41c90da6581f30c3289dff22b614e5a2a6f1b4 (diff)
downloadhomebrew-6833266bb0bfbc7628026176bd54ebd998e663d4.tar.bz2
Add popen wrapper that does not invoke the shell
Diffstat (limited to 'Library/Homebrew/test/test_utils.rb')
-rw-r--r--Library/Homebrew/test/test_utils.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_utils.rb b/Library/Homebrew/test/test_utils.rb
index 4a4d96076..f9dce3a8c 100644
--- a/Library/Homebrew/test/test_utils.rb
+++ b/Library/Homebrew/test/test_utils.rb
@@ -5,4 +5,10 @@ class UtilTests < Homebrew::TestCase
# Issue #217 put columns with new results fails.
assert_silent { puts_columns [] }
end
+
+ def test_popen_read
+ out = Utils.popen_read("/bin/sh", "-c", "echo success", &:read).chomp
+ assert_equal "success", out
+ assert_predicate $?, :success?
+ end
end