Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reindent everything (possibly breaking all branches, but for the last time)
[simgrid.git] / tools / tesh / catch-return.tesh
1 #! ./tesh
2 # This suite builds and uses a program returning 1.
3 # tesh must detect this condition and report the issue.
4
5 $ rm -rf temp_testdir
6 $ mkdir temp_testdir
7
8 $ cd temp_testdir
9 < #include <stdlib.h>
10 < int main(void) {
11 <   exit(1);
12 < }
13 $ mkfile return1.c
14
15 $ gcc -o return1 return1.c
16
17 ! expect return 41
18 < $ ./return1
19 $ ../tesh --log='log.thresh:info tesh.fmt:%m%n'
20 > Test suite from stdin
21 > [stdin:1] ./return1
22 > Test suite `(stdin)': NOK (<stdin:1> returned code 1)
23 > Output of <stdin:1> so far: 
24 > ||
25
26 $ cd ..
27 $ rm -rf temp_testdir