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"
11 ./test-select-fd${EXEEXT} r 0 < ./test-select-fd${EXEEXT} 2> t-select-in.tmp
12 test `cat t-select-in.tmp` = "1" || exit 1
16 { sleep 1; echo abc; } | ./test-select-fd${EXEEXT} r 0 2> t-select-in.tmp
17 test `cat t-select-in.tmp` = "0" || exit 1
19 echo abc | { sleep 1; ./test-select-fd${EXEEXT} r 0; } 2> t-select-in.tmp
20 test `cat t-select-in.tmp` = "1" || exit 1
24 ./test-select-fd${EXEEXT} r 0 < /dev/null 2> t-select-in.tmp
25 test `cat t-select-in.tmp` = "1" || exit 1