diff options
| author | Jack Nagel | 2014-07-05 13:50:54 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-05 13:50:54 -0500 |
| commit | 6833266bb0bfbc7628026176bd54ebd998e663d4 (patch) | |
| tree | d824cee1766f353dafb6e2ec3e552da73dbbdf0d /Library/Homebrew/test/test_utils.rb | |
| parent | ff41c90da6581f30c3289dff22b614e5a2a6f1b4 (diff) | |
| download | homebrew-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.rb | 6 |
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 |
