]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/read2.sub
Bash-4.4 patch 19
[thirdparty/bash.git] / tests / read2.sub
CommitLineData
bb70624e
JA
1a=4
2
b80f6443 3read -t 2 a < /dev/tty
3185942a
JA
4estat=$?
5if [ $estat -gt 128 ]; then
6 echo timeout 1: ok
7else
8 echo $estat
9fi
bb70624e
JA
10
11echo $a
12
13sleep 5 | read -t 1 a
3185942a
JA
14estat=$?
15if [ $estat -gt 128 ]; then
16 echo timeout 2: ok
17else
18 echo $estat
19fi
bb70624e
JA
20
21echo $a
22
b80f6443 23read -t -3 a < /dev/tty
bb70624e
JA
24echo $?
25
26echo $a
27
28# the above should all time out
29echo abcde | {
30 read -t 2 a
31 echo $a
32}