2 # Test select() on file descriptors opened for reading.
5 trap 'rm -fr $tmpfiles' 1 2 3 15
7 tmpfiles="$tmpfiles t-select-in.tmp"
12 ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < ./test-select-fd${EXEEXT}
13 test `cat t-select-in.tmp` = "1" || exit 1
18 { sleep 1; echo abc; } | ./test-select-fd${EXEEXT} r 0 t-select-in.tmp
19 test `cat t-select-in.tmp` = "0" || exit 1
22 echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0 t-select-in.tmp; }
23 test `cat t-select-in.tmp` = "1" || exit 1
28 ./test-select-fd${EXEEXT} r 0 t-select-in.tmp < /dev/null
29 test `cat t-select-in.tmp` = "1" || exit 1