File: test-lseek.sh

package info (click to toggle)
libprelude 1.0.0-11.9
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 24,456 kB
  • ctags: 17,851
  • sloc: ansic: 190,841; cpp: 38,769; xml: 30,141; sh: 11,668; makefile: 692; python: 481; awk: 341; yacc: 238; lex: 186; perl: 5
file content (17 lines) | stat: -rwxr-xr-x 315 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

tmpfiles=
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles=t-lseek.tmp
# seekable files
./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1

# pipes
echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1

# closed descriptors
./test-lseek${EXEEXT} 2 <&- >&- || exit 1

rm -rf $tmpfiles
exit 0