1
0
Fork 0
coreutils/gnulib-tests/test-lseek.sh
Daniel Baumann c08a8f7410
Adding upstream version 9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 07:57:52 +02:00

18 lines
433 B
Bash
Executable file

#!/bin/sh
tmpfiles=
trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
tmpfiles=t-lseek.tmp
# seekable files
${CHECKER} ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
# pipes
echo hi | { ${CHECKER} ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat
test "`cat t-lseek.tmp`" = "0" || exit 1
# closed descriptors
${CHECKER} ./test-lseek${EXEEXT} 2 <&- >&- || exit 1
rm -rf $tmpfiles
exit 0