From 06bb4ef420459bd5971fc02d8f5d5adbedd3a8a2 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Wed, 21 May 2014 18:37:39 -0700 Subject: javarepl: improve test by running a short program Closes #29478. Signed-off-by: Misty De Meo --- Library/Formula/javarepl.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3