Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Error message pretty printing (to ease grepping on the automatic ranking of my studen...
[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 $ cat > return1.c
14
15 $ gcc -o return1 return1.c
16
17 ! expect return 41
18 < $ ./return1
19 $ ../tesh
20 > [0.000000] [tesh/INFO] Test suite from stdin
21 > [0.000000] [tesh/INFO] [stdin:1] ./return1
22 > [0.000000] run_context.c:374: [tesh/ERROR] Child "./return1" returned code 1
23
24 $ cd ..
25 $ rm -rf temp_testdir