usleep tests: Avoid failure due to known Cygwin 3.5.3 bug.
[gnulib.git] / tests / test-verror.sh
blob3652437e94bea6e5ff7dbfb3dc132aec95684ae5
1 #!/bin/sh
2 # Test of the 'verror' module.
4 . "${srcdir=.}/init.sh"; path_prepend_ .
6 ${CHECKER} test-verror${EXEEXT} > out 2> err
7 # Verify the exit code.
8 case $? in
9 4) ;;
10 *) Exit 1;;
11 esac
13 # Normalize the stderr output on Windows platforms.
14 tr -d '\015' < err | sed 's,.*test-verror[.ex]*:,test-verror:,' > err2 || Exit 1
16 # Verify the stderr output.
17 compare - err2 <<\EOF || Exit 1
18 test-verror: bummer
19 test-verror: Zonk 123 is too large
20 test-verror: Pokémon started
21 test-verror:d1/foo.c:10: invalid blub
22 test-verror:d1/foo.c:10: invalid blarn
23 test-verror:d1/foo.c:10: unsupported glink
24 test-verror:d1/foo.c:13: invalid brump
25 test-verror:d2/foo.c:13: unsupported flinge
26 hammer
27 boing 123 is too large
28 d2/bar.c:11: bark too loud
29 test-verror: can't steal: Permission denied
30 test-verror: fatal error
31 EOF
33 # Verify the stdout output.
34 test -s out && Exit 1
36 Exit 0