#! /bin/sh
# Test atexit handling.
#
-# Copyright (C) 2019 Free Software Foundation, Inc.
+# Copyright (C) 2019-2022 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
exit 77
fi
-tmpfiles="atexit-test1.ok"
-cat <<EOF >atexit-test1.ok
-hello: write error: No space left on device
-EOF
-
tmpfiles="$tmpfiles atexit-test1.out"
: ${HELLO=hello}
${HELLO} 2>&1 1>/dev/full | tr -d '\r' >atexit-test1.out
# platforms with CRLF line endings. There is apparently no reliable
# method (across Cygwin, MingW, etc.) to force an eol style.
-: ${DIFF=diff}
-${DIFF} atexit-test1.ok atexit-test1.out
+: ${GREP=grep}
+${GREP} "^hello: write error" atexit-test1.out
result=$?
rm -fr $tmpfiles