Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
some changes for Windows (shell) compatibility and comment the sync call to test...
[simgrid.git] / tools / tesh2 / examples / catch-return.tesh
1 #! ./tesh\r
2 # This suite builds and uses a program returning 1.\r
3 # tesh must detect this condition and report the issue.\r
4 \r
5 $ rm -rf temp_testdir\r
6 $ mkdir temp_testdir\r
7 \r
8 $ cd temp_testdir\r
9 < #include <stdlib.h>\r
10 < int main(void) {\r
11 <   exit(1);\r
12 < }\r
13 $ cat > return1.c\r
14 \r
15 $ gcc -o return1 return1.c\r
16 \r
17 ! expect return $EEXITCODENOTMATCH\r
18 < $ ./return1\r
19 $ ../tesh --log="log.thresh:info tesh.fmt:%m%n"\r
20 \r
21 $ cd ..\r
22 $ rm -rf temp_testdir\r