Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update TestCommandLineCatchOutput.java

  • Loading branch information...
commit 33fdcb6f0798154ea264f22aab40a93e94386c7b 1 parent 59f92d5
@atennapel atennapel authored
View
9 program/WEB-INF/src/synthbio/simulator/test/TestCommandLineCatchOutput.java
@@ -25,11 +25,16 @@ public void testCommandline() {
Process pr = rt.exec("java -jar \"src/synthbio/simulator/test/Hello.jar\"");
BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
- String line = input.readLine();
+
+ String res = "";
+ String line = null;
+ while((line = input.readLine()) != null) {
+ res += line + "\n";
+ }
int exitVal = pr.waitFor();
- assertEquals("Hello", line);
+ assertEquals("Hello\n", res);
} catch(Exception e) {
System.out.println(e.toString());
e.printStackTrace();
Please sign in to comment.
Something went wrong with that request. Please try again.