packaging: Bump to version 1.4.17
[platform/upstream/m4.git] / tests / test-lseek.sh
1 #!/bin/sh
2
3 tmpfiles=
4 trap 'rm -fr $tmpfiles' 1 2 3 15
5
6 tmpfiles=t-lseek.tmp
7 # seekable files
8 ./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
9
10 # pipes
11 echo hi | { ./test-lseek${EXEEXT} 1; echo $? > t-lseek.tmp; cat > /dev/null; } | cat
12 test "`cat t-lseek.tmp`" = "0" || exit 1
13
14 # closed descriptors
15 ./test-lseek${EXEEXT} 2 <&- >&- || exit 1
16
17 rm -rf $tmpfiles
18 exit 0