diff options
| author | Jack Nagel | 2014-07-05 13:50:54 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-05 13:50:54 -0500 |
| commit | ad27b21cd11a4e28f4174ebb54df357d6b6221a0 (patch) | |
| tree | 3fceb4dcca1e378778bcce33737a68320d3b4596 /Library/Homebrew/test | |
| parent | 84372e570eb211af82d486b9b9dea5f6ed4ba78e (diff) | |
| download | brew-ad27b21cd11a4e28f4174ebb54df357d6b6221a0.tar.bz2 | |
Add popen wrapper that does not invoke the shell
Diffstat (limited to 'Library/Homebrew/test')
| -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 |
