diff options
Diffstat (limited to 'gnulib/tests/test-atexit.sh')
m--------- | gnulib | 0 | ||||
-rwxr-xr-x | gnulib/tests/test-atexit.sh | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gnulib b/gnulib deleted file mode 160000 -Subproject 443bc5ffcf7429e557f4a371b0661abe98ddbc1 diff --git a/gnulib/tests/test-atexit.sh b/gnulib/tests/test-atexit.sh new file mode 100755 index 0000000..643a72f --- /dev/null +++ b/gnulib/tests/test-atexit.sh @@ -0,0 +1,28 @@ +#!/bin/sh +: ${srcdir=.} +. "$srcdir/init.sh"; path_prepend_ . + +# Check that an atexit handler is called when main() returns normally. +echo > t-atexit.tmp +test-atexit +if test -f t-atexit.tmp; then + Exit 1 +fi + +# Check that an atexit handler is called when the program is left +# through exit(0). +echo > t-atexit.tmp +test-atexit 0 +if test -f t-atexit.tmp; then + Exit 1 +fi + +# Check that an atexit handler is called when the program is left +# through exit(1). +echo > t-atexit.tmp +test-atexit 1 +if test -f t-atexit.tmp; then + Exit 1 +fi + +Exit 0 |