expl: Work around inaccurate implementation on NetBSD.
[gnulib.git] / tests / test-xstdopen.sh
blob5ad2ad2569cf377b15809094fcafe27fb711df82
1 #!/bin/sh
3 # Test with all of stdin, stdout, stderr open.
4 ./test-xstdopen || exit 1
6 # The syntax for closed file descriptors in sh scripts is specified by POSIX in
7 # section 2.7.5 of
8 # http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
10 # Test with stdin closed.
11 ./test-xstdopen <&- || exit 1
13 # Test with stdout closed.
14 ./test-xstdopen >&- || exit 1
16 # Test with stderr closed.
17 ./test-xstdopen 2>&- || exit 1
19 # Test with all of stdin, stdout, stderr closed.
20 ./test-xstdopen <&- >&- 2>&- || exit 1