• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/gnulib-tests/
1#!/bin/sh
2
3tmpfiles=""
4trap 'rm -fr $tmpfiles' 1 2 3 15
5
6tmpfiles="$tmpfiles t-atexit.tmp"
7# Check that an atexit handler is called when main() returns normally.
8echo > t-atexit.tmp
9./test-atexit${EXEEXT}
10if test -f t-atexit.tmp; then
11  exit 1
12fi
13
14# Check that an atexit handler is called when the program is left
15# through exit(0).
16echo > t-atexit.tmp
17./test-atexit${EXEEXT} 0
18if test -f t-atexit.tmp; then
19  exit 1
20fi
21
22# Check that an atexit handler is called when the program is left
23# through exit(1).
24echo > t-atexit.tmp
25./test-atexit${EXEEXT} 1
26if test -f t-atexit.tmp; then
27  exit 1
28fi
29
30rm -fr $tmpfiles
31
32exit 0
33