diff options
| author | Mike Naberezny | 2014-05-21 18:37:39 -0700 |
|---|---|---|
| committer | Misty De Meo | 2014-05-21 20:40:27 -0700 |
| commit | 06bb4ef420459bd5971fc02d8f5d5adbedd3a8a2 (patch) | |
| tree | 616733146910866e6b2fbd6095b464d755c6928b /Library | |
| parent | c82541025bdc5cf34380bb3907ab0ffd3787f12e (diff) | |
| download | homebrew-06bb4ef420459bd5971fc02d8f5d5adbedd3a8a2.tar.bz2 | |
javarepl: improve test by running a short program
Closes #29478.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/javarepl.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Formula/javarepl.rb b/Library/Formula/javarepl.rb index 0126fedb7..4e691b9d2 100644 --- a/Library/Formula/javarepl.rb +++ b/Library/Formula/javarepl.rb @@ -11,6 +11,10 @@ class Javarepl < Formula end test do - system "echo :quit | javarepl" + IO.popen(bin/"javarepl", "w+") do |pipe| + pipe.write "System.out.println(64*1024)\n:quit\n" + pipe.close_write + assert pipe.read.include?("65536") + end end end |
