usleep tests: Avoid failure due to known Cygwin 3.5.3 bug.
[gnulib.git] / tests / test-atexit.sh
blob1b6a20798e49d9d6516f143b80c365fec1390cb6
1 #!/bin/sh
2 : "${srcdir=.}"
3 . "$srcdir/init.sh"; path_prepend_ .
5 # Check that an atexit handler is called when main() returns normally.
6 echo > t-atexit.tmp
7 ${CHECKER} test-atexit
8 if test -f t-atexit.tmp; then
9 Exit 1
12 # Check that an atexit handler is called when the program is left
13 # through exit(0).
14 echo > t-atexit.tmp
15 ${CHECKER} test-atexit 0
16 if test -f t-atexit.tmp; then
17 Exit 1
20 # Check that an atexit handler is called when the program is left
21 # through exit(1).
22 echo > t-atexit.tmp
23 ${CHECKER} test-atexit 1
24 if test -f t-atexit.tmp; then
25 Exit 1
28 Exit 0