Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[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-catch-return
6 $ mkdir temp_testdir-catch-return
7
8 $ cd temp_testdir-catch-return
9 < #include <stdlib.h>
10 < int main(void) {
11 <   exit(1);
12 < }
13 $ mkfile return1.c
14
15 $ cc -o return1 return1.c
16
17 ! expect return 41
18 < $ ./return1
19 $ ../tesh --enable-coverage --log='log.thresh:info tesh.fmt:%m%n'
20 > Enable coverage
21 > Test suite from stdin
22 > [(stdin):1] ./return1
23 > Test suite `(stdin)': NOK (<(stdin):1> returned code 1)
24 > Output of <(stdin):1> so far:
25 > ||
26
27 $ cd ..
28 $ rm -rf temp_testdir-catch-return