X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/72a105702165975d1702e64af7d28b60eb311672..91955eb0c8e6618f04e5efcd2cbec864f4e5f6c4:/tools/tesh2/examples/catch-return.tesh diff --git a/tools/tesh2/examples/catch-return.tesh b/tools/tesh2/examples/catch-return.tesh index f42bdb6b0e..1f8812f747 100644 --- a/tools/tesh2/examples/catch-return.tesh +++ b/tools/tesh2/examples/catch-return.tesh @@ -1,22 +1 @@ -#! ./tesh -# This suite builds and uses a program returning 1. -# tesh must detect this condition and report the issue. - -$ rm -rf temp_testdir -$ mkdir temp_testdir - -$ cd temp_testdir -< #include -< int main(void) { -< exit(1); -< } -$ Cat > return1.c - -$ gcc -o return1 return1.c - -! expect return $EEXITCODENOTMATCH -< $ ./return1 -$ ../tesh --log="log.thresh:info tesh.fmt:%m%n" - -$ cd .. -$ rm -rf temp_testdir +#! ./tesh # This suite builds and uses a program returning 1. # tesh must detect this condition and report the issue. $ rm -rf temp_testdir $ mkdir temp_testdir $ cd temp_testdir < #include < int main(void) { < exit(1); < } $ cat > return1.c $ gcc -o return1 return1.c ! expect return $EEXITCODENOTMATCH < $ ./return1 $ tesh --log="log.thresh:info tesh.fmt:%m%n" > Test unit from stdin > [stdin:1] ./return1 > [stdin:1] ./return1 : NOK (returned code `1' instead `0') > Output of so far: > || > Test unit `stdin': NOK ( exit code mismatch) $ cd .. $ rm -rf temp_testdir \ No newline at end of file