#! ./tesh D this Tesh unit tests the option of the command line `--keep-going' < #include < #include < < int < main(int argc, char* argv[]) < { < printf("Hello Tesh\n"); < < return EXIT_SUCCESS; < } < $ cat > job.c $ gcc -o job job.c # in this case the option keep-going-unit is not specified so only the first command is executed. ! expect return $EEXITCODENOTMATCH < ! expect return 1 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job $ ./tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:3] ./job > [stdin:3] ./job : NOK (returned code `0' instead `1') > Output of so far: > ||Hello Tesh > || > Test unit `(stdin)' : NOK (exit code mismatch) # in this case the option keep-going-unit is specified so, all the command are executed. ! expect return $EEXITCODENOTMATCH < ! expect return 1 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job < < ! expect return 0 < > Hello Tesh < $ ./job $ ./tesh --log="log.thresh:info tesh.fmt:%m%n" --keep-going-unit > Test unit from stdin > [stdin:3] ./job > [stdin:3] ./job : NOK (returned code `0' instead `1') > Output of so far: > ||Hello Tesh > || > [stdin:7] ./job > [stdin:11] ./job > [stdin:15] ./job > [stdin:19] ./job > Test unit `(stdin)' : NOK (exit code mismatch) $ rm -f job $ rm -f job.c