Results for builtin-read.test.sh

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

Details on runs that didn't PASS

toysh0 read line from here doc

[toysh stdout] Expected '[A\t\tB C D E]\n', got '[]\n'

stdout:
[]
stderr:
sh: read: No such file or directory
toysh1 read from empty file

[toysh stdout] Expected "['status=1', '']\n['status=1', '']\n", got "['status=127', '']\n['status=127', '']\n"

stdout:
['status=127', '']
['status=127', '']
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
toysh2 read /dev/null

[toysh stdout] Expected '1\n', got '127\n'

stdout:
127
stderr:
sh: read: No such file or directory
toysh3 read with zero args

[toysh stdout] Expected 'status=0\n', got 'status=127\n'

stdout:
status=127
stderr:
sh: read: No such file or directory
toysh4 read builtin with no newline returns status 1

[toysh stdout] Expected 'status=1\nZZZ\n', got 'status=127\n\n'
[toysh status] Expected 0, got 127

stdout:
status=127

stderr:
sh: read: No such file or directory
sh: ZZZ: No such file or directory
sush4 read builtin with no newline returns status 1

[sush stdout] Expected 'status=1\nZZZ\n', got 'status=0\nZZZ\n'

stdout:
status=0
ZZZ
stderr:
brush4 read builtin with no newline returns status 1

[brush stdout] Expected 'status=1\nZZZ\n', got 'status=0\nZZZ\n'

stdout:
status=0
ZZZ
stderr:
toysh5 read builtin splits value across multiple vars

[toysh stdout] Expected '[A/B/C D E]\n', got '[//]\n'

stdout:
[//]
stderr:
sh: read: No such file or directory
toysh6 read builtin with too few variables

[toysh stdout] Expected '/A/B//\n', got '////\n'

stdout:
////
stderr:
set: bad -o errexit
set: bad -o nounset
sh: read: No such file or directory
toysh7 read -n (with $REPLY)

[toysh stdout] Expected "['1234', '12']\n", got '[]\n'

stdout:
[]
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
toysh8 IFS= read -n (OSH regression: value saved in tempenv)

[toysh stdout] Expected "['X']\n", got "['']\n"

stdout:
['']
stderr:
sh: read: No such file or directory
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:
ksh9 read -n doesn't strip whitespace (bug fix)

[ksh stdout] Expected '[ a ]\n[ a b]\n[ a b ]\n\none var strips whitespace\n[a]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [b] []\n[a] [b] []\n' Got '[a]\n[a b]\n[a b]\n\none var strips whitespace\n[a]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [b] []\n[a] [b] []\n'

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

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

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

[toysh stdout] Expected '[ a ]\n[ a b]\n[ a b ]\n\none var strips whitespace\n[a]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [b] []\n[a] [b] []\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush9 read -n doesn't strip whitespace (bug fix)

[sush stdout] Expected '[ a ]\n[ a b]\n[ a b ]\n\none var strips whitespace\n[a]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [b] []\n[a] [b] []\n' Got '[a b]\n[a b]\n[a b]\n\none var strips whitespace\n[a b]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [b] []\n[a] [b] []\n'

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

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

three vars
[a] [] []
[a] [b] []
[a] [b] []
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:
ksh10 read -d -n - respects delimiter and splits

[ksh stdout] Expected 'delim c\n[ a]\n[ a ]\n[ a b]\n\none var\n[a]\n[a]\n[a b]\n\nthree vars\n[a] [] []\n[a] [] []\n[a] [b] []\n' Got 'delim c\n[a]\n[a]\n[a b]\n\none var\n[a]\n[a]\n[a b]\n\nthree vars\n[a] [] []\n[a] [] []\n[a] [b] []\n'

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

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

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

[toysh stdout] Expected 'delim c\n[ a]\n[ a ]\n[ a b]\n\none var\n[a]\n[a]\n[a b]\n\nthree vars\n[a] [] []\n[a] [] []\n[a] [b] []\n' Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush10 read -d -n - respects delimiter and splits

[sush stdout] Expected 'delim c\n[ a]\n[ a ]\n[ a b]\n\none var\n[a]\n[a]\n[a b]\n\nthree vars\n[a] [] []\n[a] [] []\n[a] [b] []\n' Got 'delim c\n[a]\n[a b]\n[a b]\n\none var\n[a]\n[a b]\n[a b]\n\nthree vars\n[a] [] []\n[a] [] []\n[a] [b] []\n'

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

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

three vars
[a] [] []
[a] [] []
[a] [b] []
stderr:
bash11 read -n with invalid arg

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

[toysh stdout] Expected 'status=2\n', got 'status=127\n'

stdout:
status=127
stderr:
sh: read: No such file or directory
sush11 read -n with invalid arg

[sush stdout] Expected 'status=2\n', got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: read: not_a_number: invalid number
toysh12 read -n from pipe

[toysh stdout] Expected 'reply=abc\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
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:
ksh13 read without args uses $REPLY, no splitting occurs (without -n)

[ksh stdout] Expected '[ a b ]\n[a b]\n[ a b line2]\n[a b line2]\n[ a b \\]\n[a b \\]\n' Got '[a b]\n[a b]\n[a b line2]\n[a b line2]\n[a b \\]\n[a b \\]\n'

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

[toysh stdout] Expected '[ a b ]\n[a b]\n[ a b line2]\n[a b line2]\n[ a b \\]\n[a b \\]\n' Got '[]\n[]\n[]\n[]\n[]\n[]\n'
[toysh status] Expected 0, got 127

stdout:
[]
[]
[]
[]
[]
[]
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: a: No such file or directory
sush13 read without args uses $REPLY, no splitting occurs (without -n)

[sush stdout] Expected '[ a b ]\n[a b]\n[ a b line2]\n[a b line2]\n[ a b \\]\n[a b \\]\n' Got '[a b]\n[a b]\n[a b \\]\n[a b \\]\n[a b \\]\n[a b \\]\n'

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

[brush stdout] Expected '[ a b ]\n[a b]\n[ a b line2]\n[a b line2]\n[ a b \\]\n[a b \\]\n' Got '[ a b ]\n[a b]\n[ a b \\]\n[a b \\]\n[ a b \\]\n[a b \\]\n'

stdout:
[  a b  ]
[a b]
[  a b  \]
[a b  \]
[  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:
ksh14 read -n vs. -N

[ksh stdout] Expected "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a b c' '' ''\n'a b ' '' ''\n" Got "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a' 'b' 'c'\n'a' 'b' ''\n"

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

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

[toysh stdout] Expected "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a b c' '' ''\n'a b ' '' ''\n" Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush14 read -n vs. -N

[sush stdout] Expected "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a b c' '' ''\n'a b ' '' ''\n" Got "read -n\n'a' 'b' 'c'\n'a' 'b' 'c'\n\nread -N\n'a' 'b' 'c'\n'a' 'b' 'c'\n"

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

read -N
'a' 'b' 'c'
'a' 'b' 'c'
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: `-N': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: `-N': invalid name
brush14 read -n vs. -N

[brush stdout] Expected "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a b c' '' ''\n'a b ' '' ''\n" Got "read -n\n'a' 'b' 'c'\n'a' 'b' ''\n\nread -N\n'a' 'b' 'c'\n'a' 'b' ''\n"

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

read -N
'a' 'b' 'c'
'a' 'b' ''
stderr:
toysh15 read -N ignores delimiters

[toysh stdout] Expected 'a\nb\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush15 read -N ignores delimiters

[sush stdout] Expected 'a\nb\n', got '\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `-N': invalid name
toysh16 read will unset extranous vars

[toysh stdout] Expected "'a' 'b' ''\n'a' 'b' ''\n", got "'' '' 'some value'\n"
[toysh status] Expected 0, got 2

stdout:
'' '' 'some value'
stderr:
sh: read: No such file or directory
main: line 7: sh: syntax error: (
sush16 read will unset extranous vars

[sush stdout] Expected "'a' 'b' ''\n'a' 'b' ''\n", got "'a' 'b' 'some value'\n'a' 'b' 'some value'\n"

stdout:
'a' 'b' 'some value'
'a' 'b' 'some value'
stderr:
toysh17 read -r ignores backslashes

[toysh stdout] Expected "['one two', 'one\\\\ two']\n", got "['', '']\n"

stdout:
['', '']
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
brush17 read -r ignores backslashes

[brush stdout] Expected "['one two', 'one\\\\ two']\n", got "['one\\\\ two', 'one\\\\ two']\n"

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

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

[ksh stdout] Expected "['one twox65three', 'one\\\\ two\\\\x65three']\n" Got "['one twoethree', 'one\\\\ twoethree']\n"

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

[toysh stdout] Expected "['one twox65three', 'one\\\\ two\\\\x65three']\n" Got "['', '']\n"

stdout:
['', '']
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sush18 read -r with other backslash escapes

[sush stdout] Expected "['one twox65three', 'one\\\\ two\\\\x65three']\n" Got "['one two\\\\65three', 'one\\\\ two\\\\x65three']\n"

stdout:
['one two\\65three', 'one\\ two\\x65three']
stderr:
brush18 read -r with other backslash escapes

[brush stdout] Expected "['one twox65three', 'one\\\\ two\\\\x65three']\n" Got "['one\\\\ two\\\\x65three', 'one\\\\ two\\\\x65three']\n"

stdout:
['one\\ two\\x65three', 'one\\ two\\x65three']
stderr:
toysh19 read with line continuation reads multiple physical lines

[toysh stdout] Expected "['onetwo', 'one\\\\']\n", got "['', '']\n"

stdout:
['', '']
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
brush19 read with line continuation reads multiple physical lines

[brush stdout] Expected "['onetwo', 'one\\\\']\n", got "['one\\\\', 'one\\\\']\n"

stdout:
['one\\', 'one\\']
stderr:
toysh20 read multiple vars spanning many lines

[toysh stdout] Expected "['one-two', 'three-four five-six', '']\n", got "['', '', '']\n"

stdout:
['', '', '']
stderr:
sh: read: No such file or directory
brush20 read multiple vars spanning many lines

[brush stdout] Expected "['one-two', 'three-four five-six', '']\n", got "['one-\\\\', '', '']\n"

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

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

[ksh stdout] Expected "['nline', '\\\\nline']\n", got "['', '']\n"

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

[toysh stdout] Expected "['nline', '\\\\nline']\n", got "['', '']\n"

stdout:
['', '']
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
brush21 read -r with \n

[brush stdout] Expected "['nline', '\\\\nline']\n", got "['\\\\nline', '\\\\nline']\n"

stdout:
['\\nline', '\\nline']
stderr:
toysh22 read -s from pipe, not a terminal

[toysh stdout] Expected 'foo\nba\n0\nb\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush22 read -s from pipe, not a terminal

[sush stdout] Expected 'foo\nba\n0\nb\n', got '\n\n1\n\n'

stdout:

1

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: `-s': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `-s': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: `-s': invalid name
toysh23 read with IFS=$'\n'

[toysh stdout] Expected '[ a b c]\n', got '[]\n'

stdout:
[]
stderr:
sh: read: No such file or directory
sush23 read with IFS=$'\n'

[sush stdout] Expected '[ a b c]\n', got '[a b c]\n'

stdout:
[a b c]
stderr:
toysh24 read multiple lines with IFS=:

[toysh stdout] Expected '[ \\a |b: c|d e|]\n', got '[|||]\n'

stdout:
[|||]
stderr:
sh: read: No such file or directory
sush24 read multiple lines with IFS=:

[sush stdout] Expected '[ \\a |b: c|d e|]\n', got '[\\a |b: c|d e|]\n'

stdout:
[\a |b: c|d  e|]
stderr:
brush24 read multiple lines with IFS=:

[brush stdout] Expected '[ \\a |b: c|d e|]\n', got '[ \\\\a |b\\| c|d\\]\n'

stdout:
[  \\a |b\| c|d\]
stderr:
toysh25 read with IFS=''

[toysh stdout] Expected '[ a b c d|]\n', got '[|]\n'

stdout:
[|]
stderr:
sh: read: No such file or directory
sush25 read with IFS=''

[sush stdout] Expected '[ a b c d|]\n', got '[a b c d|]\n'

stdout:
[a b c d|]
stderr:
mksh26 read does not respect C backslash escapes

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

[ksh stdout] Expected 'a b c d e f g h x65 145 i\n', got '\x07 \x08 d \x1b \x0c g h e 145 i\n'

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

[toysh stdout] Expected 'a b c d e f g h x65 145 i\n', got '\n'

stdout:
stderr: 
sh: read: No such file or directory
sush26 read does not respect C backslash escapes

[sush stdout] Expected 'a b c d e f g h x65 145 i\n', got 'a \\b \\c \\d \\e \\f \\g \\h \\x65 \\145 \\i\n'

stdout:
a \b \c \d \e \f \g \h \x65 \145 \i
stderr:
brush26 read does not respect C backslash escapes

[brush stdout] Expected 'a b c d e f g h x65 145 i\n', got '\\a \\b \\c \\d \\e \\f \\g \\h \\x65 \\145 \\i\n'

stdout:
\a \b \c \d \e \f \g \h \x65 \145 \i
stderr:
toysh27 dynamic scope used to set vars

[toysh stdout] Expected 'ref: refs/heads/dev/andy\n', got '\n'

stdout:
stderr: 
sh: read: No such file or directory
mksh28 read -a reads into array

stdout:
stderr: 
ksh28 read -a reads into array

[ksh stdout] Expected "['a', 'b', 'c d']\n['a', 'b', 'c\\\\', 'd']\n[]\n[]\n" Got "['97', '32', '98', '32', '99', '92', '32', '100']\n[]\n[]\n[]\n"

stdout:
['97', '32', '98', '32', '99', '92', '32', '100']
[]
[]
[]
stderr:
E: ksh: <stdin>[14]: read: too many arguments
toysh28 read -a reads into array

[toysh stdout] Expected "['a', 'b', 'c d']\n['a', 'b', 'c\\\\', 'd']\n[]\n[]\n" Got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
brush28 read -a reads into array

[brush stdout] Expected "['a', 'b', 'c d']\n['a', 'b', 'c\\\\', 'd']\n[]\n[]\n" Got "['a', 'b', 'c\\\\', 'd']\n['a', 'b', 'c\\\\', 'd']\n[]\n[]\n"

stdout:
['a', 'b', 'c\\', 'd']
['a', 'b', 'c\\', 'd']
[]
[]
stderr:
toysh29 read -d : (colon-separated records)

[toysh stdout] Expected 'v1=a,b,c\nv1=d v2=e,f\nv1=g v2=h v3=i\n', got 'v1=\nv1= v2=\nv1= v2= v3=\n'
[toysh status] Expected 0, got 127

stdout:
v1=
v1= v2=
v1= v2= v3=
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: a,b,c:d,e,f:g,h,i: No such file or directory
toysh30 read -d '' (null-separated records)

[toysh stdout] Expected 'v1=a,b,c\nv1=d v2=e,f\nv1=g v2=h v3=i\n', got 'v1=\nv1= v2=\nv1= v2= v3=\n'
[toysh status] Expected 0, got 127

stdout:
v1=
v1= v2=
v1= v2= v3=
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sh: a,b,cd,e,fg,h,i: No such file or directory
sush30 read -d '' (null-separated records)

[sush stdout] Expected 'v1=a,b,c\nv1=d v2=e,f\nv1=g v2=h v3=i\n', got 'v1=a,b,c\\0d,e,f\\0g,h,i\nv1=a,b,c\\0d,e,f\\0g,h,i v2=\nv1=a,b,c\\0d,e,f\\0g,h,i v2= v3=\n'

stdout:
v1=a,b,c\0d,e,f\0g,h,i
v1=a,b,c\0d,e,f\0g,h,i v2=
v1=a,b,c\0d,e,f\0g,h,i v2= v3=
stderr:
toysh31 read -rd

[toysh stdout] Expected 'foo\nbar\n', got '\n'

stdout:
stderr: 
sh: read: No such file or directory
sush31 read -rd

[sush stdout] Expected 'foo\nbar\n', got 'foo\n'

stdout:
foo
stderr:
toysh32 read -d when there's no delimiter

[toysh stdout] Expected 'foo 0\nbar 1\n', got '127\n127\n'
[toysh status] Expected 0, got 127

stdout:
127
127
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: foo:bar: No such file or directory
sush32 read -d when there's no delimiter

[sush stdout] Expected 'foo 0\nbar 1\n', got 'foo 0\nbar 0\n'

stdout:
foo 0
bar 0
stderr:
brush32 read -d when there's no delimiter

[brush stdout] Expected 'foo 0\nbar 1\n', got 'foo 0\nbar 0\n'

stdout:
foo 0
bar 0
stderr:
mksh33 read -t 0 tests if input is available

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

[ksh stdout] Expected '0\n0\nreply=\n0\n', got '1\n1\nreply=\n0\n'

stdout:
1
1
reply=
0
stderr:
toysh33 read -t 0 tests if input is available

[toysh stdout] Expected '0\n0\nreply=\n0\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush33 read -t 0 tests if input is available

[sush stdout] Expected '0\n0\nreply=\n0\n', got '1\n1\nreply=\n0\n'

stdout:
1
1
reply=
0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 9: `-t': invalid name
brush33 read -t 0 tests if input is available

[brush stdout] Expected '0\n0\nreply=\n0\n', got '1\n2\nreply=\n0\n'

stdout:
1
2
reply=
0
stderr:
 WARN not yet implemented: read -t; see https://github.com/reubeno/brush/issues/227
error: invalid value '0.0' for '-t <SECONDS>': invalid digit found in string

For more information, try '--help'.

 WARN not yet implemented: read -t; see https://github.com/reubeno/brush/issues/227
mksh34 read -t 0.5

stdout:
1
stderr:
toysh34 read -t 0.5

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

stdout:
stderr: 
main: line 1: sh: syntax error: (
brush34 read -t 0.5

[brush stdout] Expected '1\n', got '2\n'

stdout:
2
stderr:
error: invalid value '0.5' for '-t <SECONDS>': invalid digit found in string

For more information, try '--help'.

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:
toysh35 read -t -0.5 is invalid

[toysh stdout] Expected '2\n', got '127\n'

stdout:
127
stderr:
sh: read: No such file or directory
sush35 read -t -0.5 is invalid

[sush stdout] Expected '2\n', got '1\n'

stdout:
1
stderr:
mksh36 read -u

stdout:
stderr: 
ksh36 read -u

[ksh stdout] Expected 'reply=hi\n', got ''
[ksh status] Expected 0, got 2

stdout:
stderr: 
E: ksh: <stdin>[5]: read: read-only: 3
toysh36 read -u

[toysh stdout] Expected 'reply=hi\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush36 read -u

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

stdout:
reply=
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: `-u': invalid name
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
toysh37 read -u syntax error

[toysh stdout] Expected 'status=2\n', got 'status=127\n'

stdout:
status=127
stderr:
sh: read: No such file or directory
sush37 read -u syntax error

[sush stdout] Expected 'status=2\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: `-u': invalid name
mksh38 read -N doesn't respect delimiter, while read -n does

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

[ksh stdout] Expected 'foo\nfooba\n', got 'fooba\nfooba\n'

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

[toysh stdout] Expected 'foo\nfooba\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush38 read -N doesn't respect delimiter, while read -n does

[sush stdout] Expected 'foo\nfooba\n', got 'foo\n\n'

stdout:
foo

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: `-N': invalid name
mksh39 read -p (not fully tested)

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

[ksh stdout] Expected 'hi\nh\n', got '\n\n'
[ksh stderr] Expected u'', got 'E: ksh: <stdin>[3]: read: -p: no coprocess\nE: ksh: <stdin>[4]: read: -p: no coprocess\n'

stdout:

stderr:
E: ksh: <stdin>[3]: read: -p: no coprocess
E: ksh: <stdin>[4]: read: -p: no coprocess
toysh39 read -p (not fully tested)

[toysh stdout] Expected 'hi\nh\n', got ''
[toysh stderr] Expected u'', got 'main: line 1: sh: syntax error: (\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush39 read -p (not fully tested)

[sush stdout] Expected 'hi\nh\n', got '\n\n'
[sush stderr] Expected u'', got "/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: `-p': invalid name\n/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: `-p': invalid name\n"

stdout:

stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: `-p': invalid name
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: `-p': invalid name
brush39 read -p (not fully tested)

[brush stdout] Expected 'hi\nh\n', got 'Phi\nPh\n'

stdout:
Phi
Ph
stderr:
bash40 read usage

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

stdout:
stderr: 
ksh40 read usage

[ksh stdout] Expected 'status=2\n', got ''

stdout:
stderr: 
toysh40 read usage

[toysh stdout] Expected 'status=2\n', got 'status=127\n'

stdout:
status=127
stderr:
sh: read: No such file or directory
sush40 read usage

[sush stdout] Expected 'status=2\n', got 'status=1\n'

stdout:
status=1
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: read: -1: invalid number
toysh41 read with smooshed args

[toysh stdout] Expected 'var=h\n', got 'var=\n'
[toysh status] Expected 0, got 127

stdout:
var=
stderr:
sh: read: No such file or directory
sh: hi: No such file or directory
sush41 read with smooshed args

[sush stdout] Expected 'var=h\n', got 'var=\n'

stdout:
var=
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: read: -1: invalid number
mksh42 read -r -d '' for NUL strings, e.g. find -print0

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

[ksh stdout] Expected '[./a\\b\\c\\d]\n', got '[./a\x08\\d]'

stdout:
[./a\d]
stderr:
toysh42 read -r -d '' for NUL strings, e.g. find -print0

[toysh stdout] Expected '[./a\\b\\c\\d]\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush42 read -r -d '' for NUL strings, e.g. find -print0

[sush stdout] Expected '[./a\\b\\c\\d]\n', got ''
[sush status] Expected 0, got 101

stdout:
stderr: 
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(10, [91, 46, 47, 97, 92, 98, 92, 99, 92, 100, 0, 93])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
mksh43 read from redirected directory is non-fatal error

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

[ksh stdout] Expected 'status=1\n', got 'status=2\n'

stdout:
status=2
stderr:
E: ksh: <stdin>[5]: read: Is a directory
toysh43 read from redirected directory is non-fatal error

[toysh stdout] Expected 'status=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
mksh44 read -n from directory

stdout:
stderr: 
ksh44 read -n from directory

[ksh stdout] Expected 'status=1\n', got 'status=2\n'

stdout:
status=2
stderr:
E: ksh: <stdin>[6]: read: Is a directory
toysh44 read -n from directory

[toysh stdout] Expected 'status=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
bash45 mapfile from directory (bash doesn't handle errors)

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

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

[ksh stdout] Expected 'status=1\n', got 'status=127\n'

stdout:
status=127
stderr:
E: ksh: <stdin>[4]: mapfile: inaccessible or not found
toysh45 mapfile from directory (bash doesn't handle errors)

[toysh stdout] Expected 'status=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush45 mapfile from directory (bash doesn't handle errors)

[sush stdout] Expected 'status=1\n', got 'status=127\n'

stdout:
status=127
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: mapfile: command not found