Results for builtin-io.test.sh

statusdashbashmkshzshashosh
pass 216546404762
ok 332200
N-I 4001318150
BUG 518970
FAIL 000007
total696969696969
casedashbashmkshzshashoshdescription
0pass pass pass BUG pass pass echo dashes
details
1BUG pass BUG BUG pass pass echo backslashes
detailsdetailsdetails
2N-I pass pass pass pass pass echo -e backslashes
details
3N-I pass pass pass pass pass echo -en
details
4ok pass ok ok pass pass echo -ez (invalid flag)
detailsdetailsdetails
5pass pass pass pass pass pass echo -e with embedded newline
6pass pass pass pass pass pass echo -e line continuation
7N-I pass pass pass pass pass echo -e with C escapes
details
8N-I pass pass pass pass pass echo -e with whitespace C escapes
details
9N-I pass pass pass pass pass \0
details
10pass pass N-I pass pass pass \c stops processing input
details
11N-I pass pass pass pass pass echo -e with hex escape
details
12pass pass pass pass pass pass echo -e with octal escape
13N-I pass pass pass N-I pass echo -e with 4 digit unicode escape
detailsdetails
14N-I pass pass pass N-I pass echo -e with 8 digit unicode escape
detailsdetails
15N-I pass pass pass pass pass \0377 is the highest octal byte
details
16N-I pass pass pass BUG pass \0400 is one more than the highest octal byte
detailsdetails
17pass pass BUG pass BUG pass \0777 is out of range
detailsdetails
18N-I pass pass pass pass pass incomplete hex escape
details
19N-I pass BUG BUG pass pass \x
detailsdetailsdetails
20pass pass pass pass pass pass incomplete octal escape
21N-I pass pass pass BUG pass incomplete unicode escape
detailsdetails
22N-I pass pass pass N-I pass \u6
detailsdetails
23BUG pass pass pass BUG pass \0 \1 \8
detailsdetails
24pass pass pass pass pass pass Read builtin
25ok pass pass pass pass pass Read from empty file
details
26ok pass pass pass pass pass read /dev/null
details
27BUG pass pass pass pass pass read with zero args
details
28pass pass pass pass pass pass Read builtin with no newline.
29pass pass pass pass pass pass Read builtin with multiple variables
30pass pass pass pass pass pass Read builtin with not enough variables
31N-I pass pass N-I pass pass Read -n (with $REPLY)
detailsdetails
32N-I pass pass N-I pass pass IFS= read -n (OSH regression: value saved in tempenv)
detailsdetails
33N-I pass pass pass pass pass Read uses $REPLY (without -n)
details
34pass pass pass pass pass pass read -r ignores backslashes
35pass pass BUG BUG pass pass read -r with other backslash escapes
detailsdetails
36N-I pass pass pass pass pass read with line continuation reads multiple physical lines
details
37pass pass pass pass pass pass read multiple vars spanning many lines
38BUG pass BUG BUG pass pass read -r with \n
detailsdetailsdetails
39N-I pass pass N-I pass pass read -s from pipe, not a terminal
detailsdetails
40N-I pass pass pass pass pass Read with IFS=$'\n'
details
41pass pass pass pass pass pass Read multiple lines with IFS=:
42pass pass pass pass pass pass Read with IFS=''
43BUG pass BUG BUG BUG pass Read should not respect C escapes.
detailsdetailsdetailsdetails
44pass pass pass pass pass pass Read builtin uses dynamic scope
45N-I pass N-I N-I N-I pass read -a reads into array
detailsdetailsdetailsdetails
46pass ok pass N-I pass pass read -n with invalid arg
detailsdetails
47N-I pass pass N-I N-I pass read returns correct number of bytes without EOF
detailsdetailsdetails
48N-I pass pass pass BUG pass read -d : (colon-separated records)
detailsdetails
49N-I pass pass pass BUG pass read -d '' (null-separated records)
detailsdetails
50N-I pass pass pass pass pass read -rd
details
51N-I pass pass pass pass pass read -d when there's no delimiter
details
52N-I pass N-I N-I pass pass read -t 0 tests if input is available
detailsdetailsdetails
53N-I pass BUG BUG pass FAIL read -t 0.5
detailsdetailsdetailsdetails
54pass BUG pass BUG pass pass read -t -0.5 is invalid
detailsdetails
55N-I pass N-I pass pass FAIL read -u
detailsdetailsdetails
56pass ok pass ok pass pass read -u syntax error
detailsdetails
57N-I pass ok N-I N-I FAIL read -N doesn't respect delimiter, while read -n does
detailsdetailsdetailsdetailsdetails
58pass ok BUG BUG pass pass read usage
detailsdetailsdetails
59N-I pass pass N-I pass pass read with smooshed args
detailsdetails
60N-I pass N-I N-I N-I pass mapfile
detailsdetailsdetailsdetails
61N-I pass N-I N-I N-I pass readarray (synonym for mapfile)
detailsdetailsdetailsdetails
62N-I pass N-I N-I N-I pass mapfile (array name): arr
detailsdetailsdetailsdetails
63N-I pass N-I N-I N-I FAIL mapfile (delimiter): -d delim
detailsdetailsdetailsdetailsdetails
64N-I pass N-I N-I N-I FAIL mapfile (delimiter): -d '' (null-separated)
detailsdetailsdetailsdetailsdetails
65N-I pass N-I N-I N-I pass mapfile (truncate delim): -t
detailsdetailsdetailsdetails
66N-I pass N-I N-I N-I pass mapfile -t doesn't remove \r
detailsdetailsdetailsdetails
67N-I pass N-I N-I N-I FAIL mapfile (store position): -O start
detailsdetailsdetailsdetailsdetails
68N-I pass N-I N-I N-I FAIL mapfile (input range): -s start -n count
detailsdetailsdetailsdetailsdetails
281 passed, 10 OK, 86 not implemented, 30 BUG, 7 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

zsh0 echo dashes

stdout:
--
---
stderr:
dash1 echo backslashes

stdout:
\
\
\
\
stderr:
mksh1 echo backslashes

stdout:
\
\
\
\
stderr:
zsh1 echo backslashes

stdout:
\
\
\
\
stderr:
dash2 echo -e backslashes

stdout:
-e \
-e \
-e \
-e \
stderr:
dash3 echo -en

stdout:
-en abc
def

stderr:
dash4 echo -ez (invalid flag)

stdout:
-ez abc

stderr:
mksh4 echo -ez (invalid flag)

stdout:
-ez abc

stderr:
zsh4 echo -ez (invalid flag)

stdout:
-ez abc

stderr:
dash7 echo -e with C escapes

stdout:
-e \d\e
stderr:
dash8 echo -e with whitespace C escapes

stdout:
-e 

	
stderr:
dash9 \0

stdout:
-e abcd
stderr:
mksh10 \c stops processing input

stdout:
xy abde zzz
stderr:
dash11 echo -e with hex escape

stdout:
-e abcd\x65f
stderr:
dash13 echo -e with 4 digit unicode escape

stdout:
abcd\u0065f
stderr:
ash13 echo -e with 4 digit unicode escape

stdout:
abcd\u0065f
stderr:
dash14 echo -e with 8 digit unicode escape

stdout:
abcd\U00000065f
stderr:
ash14 echo -e with 8 digit unicode escape

stdout:
abcd\U00000065f
stderr:
dash15 \0377 is the highest octal byte

stdout:
 2d 65 6e 20 ff 37 0a
stderr:
dash16 \0400 is one more than the highest octal byte

stdout:
 2d 65 6e 20 00 30 0a
stderr:
ash16 \0400 is one more than the highest octal byte

stdout:
 20 30 30
stderr:
mksh17 \0777 is out of range

stdout:
 c3 bf
stderr:
ash17 \0777 is out of range

stdout:
 3f 37
stderr:
dash18 incomplete hex escape

stdout:
 - e n a b c d \ x 6 \n
stderr:
dash19 \x

stdout:
 - e \ x \ x g \n
stderr:
mksh19 \x

stdout:
 \0 \0 g \n
stderr:
zsh19 \x

stdout:
 \0 \0 g \n
stderr:
dash21 incomplete unicode escape

stdout:
 - e n a b c d \ u 0 0 6 \n
stderr:
ash21 incomplete unicode escape

stdout:
 a b c d \ u 0 0 6
stderr:
dash22 \u6

stdout:
 \ u 6
stderr:
ash22 \u6

stdout:
 \ u 6
stderr:
dash23 \0 \1 \8

stdout:
 \0 001 \ 8
stderr:
ash23 \0 \1 \8

stdout:
 \0 001 \ 8
stderr:
dash25 Read from empty file

stdout:
['status=1', '']
['status=2', '']
stderr:
dash: 4: read: arg count
dash26 read /dev/null

stdout:
2
stderr:
dash: 1: read: Illegal option -n
dash27 read with zero args

stdout:
status=2
stderr:
dash: 1: read: arg count
dash31 Read -n (with $REPLY)

stdout:
[]
stderr:
dash: 2: read: Illegal option -n
dash: 3: read: Illegal option -n
zsh31 Read -n (with $REPLY)

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

stdout:
['']
stderr:
dash: 2: read: Illegal option -n
zsh32 IFS= read -n (OSH regression: value saved in tempenv)

stdout:
['']
stderr:
dash33 Read uses $REPLY (without -n)

stdout:
stderr: 
dash: 2: read: arg count
mksh35 read -r with other backslash escapes

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

stdout:
['one twoethree', 'one\\ twoethree']
stderr:
dash36 read with line continuation reads multiple physical lines

stdout:
['-e onetwo', '-e one\\']
stderr:
dash38 read -r with \n

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

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

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

stdout:
stderr: 
zsh39 read -s from pipe, not a terminal

stdout:
stderr: 
dash40 Read with IFS=$'\n'

stdout:
[a b c]
stderr:
dash43 Read should not respect C escapes.

stdout:
 
stderr:
mksh43 Read should not respect C escapes.

stdout:
  d   g h e 145 i
stderr:
zsh43 Read should not respect C escapes.

stdout:
 
stderr:
ash43 Read should not respect C escapes.

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

stdout:
stderr: 
mksh45 read -a reads into array

stdout:
stderr: 
zsh45 read -a reads into array

stdout:
stderr: 
ash45 read -a reads into array

stdout:
stderr: 
ash: read: line 6: illegal option -a
ash: syntax error: bad substitution
bash46 read -n with invalid arg

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

stdout:
stderr: 
dash47 read returns correct number of bytes without EOF

stdout:
stderr: 
zsh47 read returns correct number of bytes without EOF

stdout:
stderr: 
ash47 read returns correct number of bytes without EOF

stdout:
stderr: 
dash48 read -d : (colon-separated records)

stdout:
v1=
v1= v2=
v1= v2= v3=
stderr:
dash: 3: read: Illegal option -d
dash: 5: read: Illegal option -d
dash: 7: read: Illegal option -d
ash48 read -d : (colon-separated records)

stdout:
v1=a,b,c
v1=d,e,f v2=
v1=g,h,i v2= v3=
stderr:
dash49 read -d '' (null-separated records)

stdout:
v1=
v1= v2=
v1= v2= v3=
stderr:
dash: 3: read: Illegal option -d
dash: 5: read: Illegal option -d
dash: 7: read: Illegal option -d
ash49 read -d '' (null-separated records)

stdout:
v1=a,b,cd,e,fg,h,i
v1= v2=
v1= v2= v3=
stderr:
dash50 read -rd

stdout:
stderr: 
dash: 1: read: Illegal option -d
dash51 read -d when there's no delimiter

stdout:
2
2
stderr:
dash: 1: read: Illegal option -d
dash: 3: read: Illegal option -d
dash52 read -t 0 tests if input is available

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

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

stdout:
stderr: 
dash53 read -t 0.5

stdout:
stderr: 
mksh53 read -t 0.5

stdout:
1
stderr:
zsh53 read -t 0.5

stdout:
1
stderr:
osh53 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 ]:2: fatal: read -t isn't implemented (except t=0)
bash54 read -t -0.5 is invalid

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

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

stdout:
stderr: 
mksh55 read -u

stdout:
stderr: 
osh55 read -u

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

stdout:
reply=
stderr:
bash56 read -u syntax error

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

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

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

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

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

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

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

stdout:
fooba
fooba
stderr:
  echo foobar | { read -N 5 -d b; echo $REPLY; }
                       ^~
[ stdin ]:3: 'read' doesn't accept flag -N
bash58 read usage

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

stdout:
stderr: 
zsh58 read usage

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

stdout:
var=
stderr:
dash: 1: read: Illegal option -n
zsh59 read with smooshed args

stdout:
var=
stderr:
zsh: bad option: -1
dash60 mapfile

stdout:
stderr: 
mksh60 mapfile

stdout:
stderr: 
zsh60 mapfile

stdout:
stderr: 
ash60 mapfile

stdout:
stderr: 
dash61 readarray (synonym for mapfile)

stdout:
stderr: 
mksh61 readarray (synonym for mapfile)

stdout:
stderr: 
zsh61 readarray (synonym for mapfile)

stdout:
stderr: 
ash61 readarray (synonym for mapfile)

stdout:
stderr: 
dash62 mapfile (array name): arr

stdout:
stderr: 
mksh62 mapfile (array name): arr

stdout:
stderr: 
zsh62 mapfile (array name): arr

stdout:
stderr: 
ash62 mapfile (array name): arr

stdout:
stderr: 
dash63 mapfile (delimiter): -d delim

stdout:
stderr: 
mksh63 mapfile (delimiter): -d delim

stdout:
stderr: 
zsh63 mapfile (delimiter): -d delim

stdout:
stderr: 
ash63 mapfile (delimiter): -d delim

stdout:
stderr: 
osh63 mapfile (delimiter): -d delim

[osh stdout] Expected 'n=3\n[1:]\n[3:]\n[5:]\n', got 'n=0\n[]\n'

stdout:
n=0
[]
stderr:
    mapfile -d : arr
            ^~
[ stdin ]:3: 'mapfile' doesn't accept flag -d
dash64 mapfile (delimiter): -d '' (null-separated)

stdout:
stderr: 
mksh64 mapfile (delimiter): -d '' (null-separated)

stdout:
stderr: 
zsh64 mapfile (delimiter): -d '' (null-separated)

stdout:
stderr: 
ash64 mapfile (delimiter): -d '' (null-separated)

stdout:
stderr: 
osh64 mapfile (delimiter): -d '' (null-separated)

[osh stdout] Expected 'n=3\n[1]\n[3]\n[5]\n', got 'n=0\n[]\n'

stdout:
n=0
[]
stderr:
    mapfile -d '' arr
            ^~
[ stdin ]:3: 'mapfile' doesn't accept flag -d
dash65 mapfile (truncate delim): -t

stdout:
stderr: 
mksh65 mapfile (truncate delim): -t

stdout:
stderr: 
zsh65 mapfile (truncate delim): -t

stdout:
stderr: 
ash65 mapfile (truncate delim): -t

stdout:
stderr: 
dash66 mapfile -t doesn't remove \r

stdout:
stderr: 
mksh66 mapfile -t doesn't remove \r

stdout:
stderr: 
zsh66 mapfile -t doesn't remove \r

stdout:
stderr: 
ash66 mapfile -t doesn't remove \r

stdout:
stderr: 
dash67 mapfile (store position): -O start

stdout:
stderr: 
mksh67 mapfile (store position): -O start

stdout:
stderr: 
zsh67 mapfile (store position): -O start

stdout:
stderr: 
ash67 mapfile (store position): -O start

stdout:
stderr: 
osh67 mapfile (store position): -O start

[osh stdout] Expected 'n=5\n[x]\n[y]\n[a0]\n[a1]\n[a2]\n', got 'n=3\n[x]\n[y]\n[z]\n'

stdout:
n=3
[x]
[y]
[z]
stderr:
    mapfile -O 2 -t arr
            ^~
[ stdin ]:4: 'mapfile' doesn't accept flag -O
dash68 mapfile (input range): -s start -n count

stdout:
stderr: 
mksh68 mapfile (input range): -s start -n count

stdout:
stderr: 
zsh68 mapfile (input range): -s start -n count

stdout:
stderr: 
ash68 mapfile (input range): -s start -n count

stdout:
stderr: 
osh68 mapfile (input range): -s start -n count

[osh stdout] Expected 'n=3\n[a5]\n[a6]\n[a7]\n', got 'n=0\n[]\n'

stdout:
n=0
[]
stderr:
    mapfile -s 5 -n 3 -t arr
            ^~
[ stdin ]:3: 'mapfile' doesn't accept flag -s