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