X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b60e90a0d13919269803386169e3da3aa8697f79..ee964dcd8dbf778a1e2adad6c32ddd6914d85449:/tools/tesh2/examples/catch-return.tesh diff --git a/tools/tesh2/examples/catch-return.tesh b/tools/tesh2/examples/catch-return.tesh index 6411ec9005..1f8812f747 100644 --- a/tools/tesh2/examples/catch-return.tesh +++ b/tools/tesh2/examples/catch-return.tesh @@ -1 +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" > 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 +#! ./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