Exemplo n.º 1
0
 public void testInput() throws IOException {
   ExecutionResult res;
   res = executor.exec("bad input", false, false, scriptDir.getPath("input.sh"));
   assertEquals(1, res.getExitValue());
   res = executor.exec("good input", false, false, scriptDir.getPath("input.sh"));
   assertEquals(0, res.getExitValue());
 }
Exemplo n.º 2
0
 public void testError() throws IOException {
   ExecutionResult res;
   res = executor.exec(false, true, scriptDir.getPath("error.sh"));
   assertEquals(0, res.getExitValue());
   assertEquals("error.sh\n", res.getError());
 }
Exemplo n.º 3
0
 public void testExitValue() throws IOException {
   ExecutionResult res = executor.exec(scriptDir.getPath("exitValue.sh"));
   assertEquals(4, res.getExitValue());
 }