Results for builtin-read.test.sh

statusbashmkshzshashosh
pass 4128213744
ok 33100
N-I 061680
BUG 29810
FAIL 00002
total4646464646
casebashmkshzshashoshdescription
0pass pass pass pass pass read line from here doc
1pass pass pass pass pass read from empty file
2pass pass pass pass pass read /dev/null
3pass pass pass pass pass read with zero args
4pass pass pass pass pass read builtin with no newline returns status 1
5pass pass pass pass pass read builtin splits value across multiple vars
6pass pass pass pass pass read builtin with too few variables
7pass pass N-I pass pass read -n (with $REPLY)
details
8pass pass N-I pass pass IFS= read -n (OSH regression: value saved in tempenv)
details
9pass BUG N-I pass pass read -n doesn't strip whitespace (bug fix)
detailsdetails
10pass BUG N-I N-I pass read -d -n - respects delimiter and splits
detailsdetailsdetails
11ok pass N-I pass pass read -n with invalid arg
detailsdetails
12pass pass N-I N-I pass read -n from pipe
detailsdetails
13pass BUG BUG pass pass read without args uses $REPLY, no splitting occurs (without -n)
detailsdetails
14pass BUG N-I N-I pass read -n vs. -N
detailsdetailsdetails
15pass pass N-I N-I pass read -N ignores delimiters
detailsdetails
16pass pass BUG pass pass read will unset extranous vars
details
17pass pass pass pass pass read -r ignores backslashes
18pass BUG BUG pass pass read -r with other backslash escapes
detailsdetails
19pass pass pass pass pass read with line continuation reads multiple physical lines
20pass pass pass pass pass read multiple vars spanning many lines
21pass BUG BUG pass pass read -r with \n
detailsdetails
22pass pass N-I pass pass read -s from pipe, not a terminal
details
23pass pass pass pass pass read with IFS=$'\n'
24pass pass pass pass pass read multiple lines with IFS=:
25pass pass pass pass pass read with IFS=''
26pass BUG BUG BUG pass read does not respect C backslash escapes
detailsdetailsdetails
27pass pass pass pass pass dynamic scope used to set vars
28pass N-I N-I N-I pass read -a reads into array
detailsdetailsdetails
29pass pass pass pass pass read -d : (colon-separated records)
30pass pass pass pass pass read -d '' (null-separated records)
31pass pass pass pass pass read -rd
32pass pass pass pass pass read -d when there's no delimiter
33pass N-I N-I pass pass read -t 0 tests if input is available
detailsdetails
34pass BUG BUG pass FAIL read -t 0.5
detailsdetailsdetails
35BUG pass BUG pass pass read -t -0.5 is invalid
detailsdetails
36pass N-I pass pass FAIL read -u
detailsdetails
37ok pass ok pass pass read -u syntax error
detailsdetails
38pass ok N-I N-I pass read -N doesn't respect delimiter, while read -n does
detailsdetailsdetails
39pass N-I N-I pass pass read -p (not fully tested)
detailsdetails
40ok BUG BUG pass pass read usage
detailsdetailsdetails
41pass pass N-I pass pass read with smooshed args
details
42pass N-I N-I pass pass read -r -d '' for NUL strings, e.g. find -print0
detailsdetails
43pass ok pass pass pass read from redirected directory is non-fatal error
details
44pass ok pass N-I pass read -n from directory
detailsdetails
45BUG N-I N-I N-I pass mapfile from directory (bash doesn't handle errors)
detailsdetailsdetailsdetails
171 passed, 7 OK, 30 not implemented, 20 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

zsh7 read -n (with $REPLY)

stdout:
[]
stderr:
zsh8 IFS= read -n (OSH regression: value saved in tempenv)

stdout:
['']
stderr:
mksh9 read -n doesn't strip whitespace (bug fix)

stdout:
[a]
[a b]
[a b]

one var strips whitespace
[a]
[a b]
[a b]

three vars
[a] [] []
[a] [b] []
[a] [b] []
stderr:
zsh9 read -n doesn't strip whitespace (bug fix)

stdout:
stderr: 
mksh10 read -d -n - respects delimiter and splits

stdout:
delim c
[a]
[a]
[a b]

one var
[a]
[a]
[a b]

three vars
[a] [] []
[a] [] []
[a] [b] []
stderr:
zsh10 read -d -n - respects delimiter and splits

stdout:
stderr: 
ash10 read -d -n - respects delimiter and splits

stdout:
stderr: 
bash11 read -n with invalid arg

stdout:
status=1
stderr:
bash: line 1: read: not_a_number: invalid number
zsh11 read -n with invalid arg

stdout:
stderr: 
zsh12 read -n from pipe

stdout:
stderr: 
ash12 read -n from pipe

stdout:
stderr: 
mksh13 read without args uses $REPLY, no splitting occurs (without -n)

stdout:
[a b]
[a b]
[a b    line2]
[a b    line2]
[a b  \]
[a b  \]
stderr:
zsh13 read without args uses $REPLY, no splitting occurs (without -n)

stdout:
[a b]
[a b]
[a b    line2]
[a b    line2]
[a b  \]
[a b  \]
stderr:
mksh14 read -n vs. -N

stdout:
read -n
'a' 'b' 'c'
'a' 'b' ''

read -N
'a' 'b' 'c'
'a' 'b' ''
stderr:
zsh14 read -n vs. -N

stdout:
stderr: 
ash14 read -n vs. -N

stdout:
stderr: 
zsh15 read -N ignores delimiters

stdout:
stderr: 
ash15 read -N ignores delimiters

stdout:
stderr: 
zsh16 read will unset extranous vars

stdout:
'a' 'b' ''
'b' '' ''
stderr:
mksh18 read -r with other backslash escapes

stdout:
['one twoethree', 'one\\ twoethree']
stderr:
zsh18 read -r with other backslash escapes

stdout:
['one twoethree', 'one\\ twoethree']
stderr:
mksh21 read -r with \n

stdout:
['', '']
stderr:
zsh21 read -r with \n

stdout:
['', '']
stderr:
zsh22 read -s from pipe, not a terminal

stdout:
stderr: 
mksh26 read does not respect C backslash escapes

stdout:
  d   g h e 145 i
stderr:
zsh26 read does not respect C backslash escapes

stdout:
 
stderr:
ash26 read does not respect C backslash escapes

stdout:
abcdefghx65 145 i
stderr:
mksh28 read -a reads into array

stdout:
stderr: 
zsh28 read -a reads into array

stdout:
stderr: 
ash28 read -a reads into array

stdout:
stderr: 
ash: read: line 7: illegal option -a
ash: syntax error: bad substitution
mksh33 read -t 0 tests if input is available

stdout:
stderr: 
zsh33 read -t 0 tests if input is available

stdout:
stderr: 
mksh34 read -t 0.5

stdout:
1
stderr:
zsh34 read -t 0.5

stdout:
1
stderr:
osh34 read -t 0.5

[osh stdout] Expected '1\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  read -t 0.5 < /dev/null
  ^~~~
[ stdin ]:3: fatal: read -t isn't implemented (except t=0)
bash35 read -t -0.5 is invalid

stdout:
1
stderr:
zsh35 read -t -0.5 is invalid

stdout:
stderr: 
zsh: not an identifier: -0.5
mksh36 read -u

stdout:
stderr: 
osh36 read -u

[osh stdout] Expected 'reply=hi\n', got 'reply=\n'

stdout:
reply=
stderr:
  read -u 3 3<<EOF
  ^~~~
[ stdin ]:3: 'read' -u flag not implemented
bash37 read -u syntax error

stdout:
status=1
stderr:
bash: line 1: read: -3: invalid file descriptor specification
zsh37 read -u syntax error

stdout:
status=1
stderr:
mksh38 read -N doesn't respect delimiter, while read -n does

stdout:
fooba
fooba
stderr:
zsh38 read -N doesn't respect delimiter, while read -n does

stdout:
stderr: 
ash38 read -N doesn't respect delimiter, while read -n does

stdout:
stderr: 
mksh39 read -p (not fully tested)

stdout:
stderr: 
zsh39 read -p (not fully tested)

stdout:
stderr: 
bash40 read usage

stdout:
status=1
stderr:
bash: line 1: read: -1: invalid number
mksh40 read usage

stdout:
stderr: 
zsh40 read usage

stdout:
stderr: 
zsh: not an identifier: -1
zsh41 read with smooshed args

stdout:
var=
stderr:
zsh: bad option: -1
mksh42 read -r -d '' for NUL strings, e.g. find -print0

stdout:
stderr: 
zsh42 read -r -d '' for NUL strings, e.g. find -print0

stdout:
stderr: 
mksh43 read from redirected directory is non-fatal error

stdout:
stderr: 
mksh44 read -n from directory

stdout:
stderr: 
ash44 read -n from directory

stdout:
stderr: 
bash45 mapfile from directory (bash doesn't handle errors)

stdout:
status=0
stderr:
mksh45 mapfile from directory (bash doesn't handle errors)

stdout:
stderr: 
zsh45 mapfile from directory (bash doesn't handle errors)

stdout:
stderr: 
ash45 mapfile from directory (bash doesn't handle errors)

stdout:
stderr: