summaryrefslogtreecommitdiff
path: root/chapter21/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'chapter21/src/test/java/com')
-rw-r--r--chapter21/src/test/java/com/seaofnodes/simple/TestC.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/chapter21/src/test/java/com/seaofnodes/simple/TestC.java b/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
index 160569b1..2d908699 100644
--- a/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
+++ b/chapter21/src/test/java/com/seaofnodes/simple/TestC.java
@@ -79,6 +79,10 @@ public abstract class TestC {
Process smp = new ProcessBuilder(bin).redirectErrorStream(true).start();
try { error = (byte)smp.waitFor(); } catch( InterruptedException e ) { throw new IOException("interrupted"); }
result = new String(smp.getInputStream().readAllBytes());
+ if( error!=0 ) {
+ System.err.println("exec error code: "+error);
+ System.err.println(result);
+ }
assertEquals( 0, error );
assertEquals(expected,result);
}