spec test index / oilshell.org
status | dash | bash | mksh | zsh | ash | osh | osh_ALT | |
pass | 18 | 56 | 40 | 38 | 37 | 49 | 49 | |
ok | 2 | 1 | 1 | 1 | 0 | 0 | 0 | |
N-I | 32 | 0 | 10 | 12 | 13 | 0 | 0 | |
BUG | 5 | 0 | 6 | 6 | 7 | 0 | 0 | |
FAIL | 0 | 0 | 0 | 0 | 0 | 8 | 8 | |
total | 57 | 57 | 57 | 57 | 57 | 57 | 57 | |
case | dash | bash | mksh | zsh | ash | osh | osh_ALT | description |
0 | pass | pass | pass | BUG | pass | pass | pass | echo dashes |
details | ||||||||
1 | BUG | pass | BUG | BUG | pass | pass | pass | echo backslashes |
details | details | details | ||||||
2 | N-I | pass | pass | pass | pass | pass | pass | echo -e backslashes |
details | ||||||||
3 | N-I | pass | pass | pass | pass | pass | pass | echo -en |
details | ||||||||
4 | ok | pass | ok | ok | pass | pass | pass | echo -ez (invalid flag) |
details | details | details | ||||||
5 | pass | pass | pass | pass | pass | pass | pass | echo -e with embedded newline |
6 | pass | pass | pass | pass | pass | pass | pass | echo -e line continuation |
7 | N-I | pass | pass | pass | pass | pass | pass | echo -e with C escapes |
details | ||||||||
8 | N-I | pass | pass | pass | pass | pass | pass | echo -e with whitespace C escapes |
details | ||||||||
9 | N-I | pass | pass | pass | pass | pass | pass | \0 |
details | ||||||||
10 | pass | pass | N-I | pass | pass | pass | pass | \c stops processing input |
details | ||||||||
11 | N-I | pass | pass | pass | pass | pass | pass | echo -e with hex escape |
details | ||||||||
12 | pass | pass | pass | pass | pass | pass | pass | echo -e with octal escape |
13 | N-I | pass | pass | pass | N-I | pass | pass | echo -e with 4 digit unicode escape |
details | details | |||||||
14 | N-I | pass | pass | pass | N-I | pass | pass | echo -e with 8 digit unicode escape |
details | details | |||||||
15 | N-I | pass | pass | pass | pass | pass | pass | \0377 is the highest octal byte |
details | ||||||||
16 | N-I | pass | pass | pass | BUG | pass | pass | \0400 is one more than the highest octal byte |
details | details | |||||||
17 | pass | pass | BUG | pass | BUG | pass | pass | \0777 is out of range |
details | details | |||||||
18 | N-I | pass | pass | pass | pass | pass | pass | incomplete hex escape |
details | ||||||||
19 | N-I | pass | BUG | BUG | pass | pass | pass | \x |
details | details | details | ||||||
20 | pass | pass | pass | pass | pass | pass | pass | incomplete octal escape |
21 | N-I | pass | pass | pass | BUG | pass | pass | incomplete unicode escape |
details | details | |||||||
22 | N-I | pass | pass | pass | N-I | pass | pass | \u6 |
details | details | |||||||
23 | BUG | pass | pass | pass | BUG | pass | pass | \0 \1 \8 |
details | details | |||||||
24 | pass | pass | pass | pass | pass | pass | pass | Read builtin |
25 | ok | pass | pass | pass | pass | pass | pass | Read from empty file |
details | ||||||||
26 | BUG | pass | pass | pass | pass | pass | pass | read with zero args |
details | ||||||||
27 | pass | pass | pass | pass | pass | pass | pass | Read builtin with no newline. |
28 | pass | pass | pass | pass | pass | pass | pass | Read builtin with multiple variables |
29 | pass | pass | pass | pass | pass | pass | pass | Read builtin with not enough variables |
30 | N-I | pass | pass | N-I | pass | pass | pass | Read -n (with $REPLY) |
details | details | |||||||
31 | N-I | pass | pass | pass | pass | pass | pass | Read uses $REPLY (without -n) |
details | ||||||||
32 | pass | pass | pass | pass | pass | pass | pass | read -r ignores backslashes |
33 | pass | pass | BUG | BUG | pass | pass | pass | read -r with other backslash escapes |
details | details | |||||||
34 | N-I | pass | pass | pass | pass | pass | pass | read with line continuation reads multiple physical lines |
details | ||||||||
35 | pass | pass | pass | pass | pass | pass | pass | read multiple vars spanning many lines |
36 | BUG | pass | BUG | BUG | pass | pass | pass | read -r with \n |
details | details | details | ||||||
37 | N-I | pass | pass | pass | pass | pass | pass | Read with IFS=$'\n' |
details | ||||||||
38 | pass | pass | pass | pass | pass | pass | pass | Read multiple lines with IFS=: |
39 | pass | pass | pass | pass | pass | pass | pass | Read with IFS='' |
40 | BUG | pass | BUG | BUG | BUG | pass | pass | Read should not respect C escapes. |
details | details | details | details | |||||
41 | pass | pass | pass | pass | pass | pass | pass | Read builtin uses dynamic scope |
42 | N-I | pass | N-I | N-I | N-I | pass | pass | read -a reads into array |
details | details | details | details | |||||
43 | pass | ok | pass | N-I | pass | pass | pass | read -n with invalid arg |
details | details | |||||||
44 | N-I | pass | pass | N-I | N-I | pass | pass | read returns correct number of bytes without EOF |
details | details | details | ||||||
45 | N-I | pass | pass | pass | BUG | pass | pass | read -d : (colon-separated records) |
details | details | |||||||
46 | N-I | pass | pass | pass | BUG | pass | pass | read -d '' (null-separated records) |
details | details | |||||||
47 | N-I | pass | pass | pass | pass | pass | pass | read -rd |
details | ||||||||
48 | N-I | pass | pass | pass | pass | pass | pass | read -d when there's no delimiter |
details | ||||||||
49 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile |
details | details | details | details | details | details | |||
50 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | readarray (synonym for mapfile) |
details | details | details | details | details | details | |||
51 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (array name): arr |
details | details | details | details | details | details | |||
52 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (delimeter): -d delim |
details | details | details | details | details | details | |||
53 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (delimiter): -d '' (null-separated) |
details | details | details | details | details | details | |||
54 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (truncate delim): -t |
details | details | details | details | details | details | |||
55 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (store position): -O start |
details | details | details | details | details | details | |||
56 | N-I | pass | N-I | N-I | N-I | FAIL | FAIL | mapfile (input range): -s start -n count |
details | details | details | details | details | details |
287 passed, 5 OK, 67 not implemented, 24 BUG, 8 failed, 0 timeouts, 0 cases skipped 8 failed under osh
zsh | 0 echo dashes stdout: -- ---stderr: |
dash | 1 echo backslashes stdout: \ \ \ \stderr: |
mksh | 1 echo backslashes stdout: \ \ \ \stderr: |
zsh | 1 echo backslashes stdout: \ \ \ \stderr: |
dash | 2 echo -e backslashes stdout: -e \ -e \ -e \ -e \stderr: |
dash | 3 echo -en stdout: -en abc defstderr: |
dash | 4 echo -ez (invalid flag) stdout: -ez abcstderr: |
mksh | 4 echo -ez (invalid flag) stdout: -ez abcstderr: |
zsh | 4 echo -ez (invalid flag) stdout: -ez abcstderr: |
dash | 7 echo -e with C escapes stdout: -e \d\estderr: |
dash | 8 echo -e with whitespace C escapes stdout: -estderr: |
dash | 9 \0 stdout: -e ab cdstderr: |
mksh | 10 \c stops processing input stdout: xy abde zzzstderr: |
dash | 11 echo -e with hex escape stdout: -e abcd\x65fstderr: |
dash | 13 echo -e with 4 digit unicode escape stdout: abcd\u0065fstderr: |
ash | 13 echo -e with 4 digit unicode escape stdout: abcd\u0065fstderr: |
dash | 14 echo -e with 8 digit unicode escape stdout: abcd\U00000065fstderr: |
ash | 14 echo -e with 8 digit unicode escape stdout: abcd\U00000065fstderr: |
dash | 15 \0377 is the highest octal byte stdout: 2d 65 6e 20 ff 37 0astderr: |
dash | 16 \0400 is one more than the highest octal byte stdout: 2d 65 6e 20 00 30 0astderr: |
ash | 16 \0400 is one more than the highest octal byte stdout: 20 30 30stderr: |
mksh | 17 \0777 is out of range stdout: c3 bfstderr: |
ash | 17 \0777 is out of range stdout: 3f 37stderr: |
dash | 18 incomplete hex escape stdout: - e n a b c d \ x 6 \nstderr: |
dash | 19 \x stdout: - e \ x \ x g \nstderr: |
mksh | 19 \x stdout: \0 \0 g \nstderr: |
zsh | 19 \x stdout: \0 \0 g \nstderr: |
dash | 21 incomplete unicode escape stdout: - e n a b c d \ u 0 0 6 \nstderr: |
ash | 21 incomplete unicode escape stdout: a b c d \ u 0 0 6stderr: |
dash | 22 \u6 stdout: \ u 6stderr: |
ash | 22 \u6 stdout: \ u 6stderr: |
dash | 23 \0 \1 \8 stdout: \0 001 \ 8stderr: |
ash | 23 \0 \1 \8 stdout: \0 001 \ 8stderr: |
dash | 25 Read from empty file stdout: ['status=1', ''] ['status=2', '']stderr: dash: 4: read: arg count |
dash | 26 read with zero args stdout: status=2stderr: dash: 1: read: arg count |
dash | 30 Read -n (with $REPLY) stdout: []stderr: dash: 2: read: Illegal option -n dash: 3: read: Illegal option -n |
zsh | 30 Read -n (with $REPLY) stdout: []stderr: |
dash | 31 Read uses $REPLY (without -n) stdout: stderr: dash: 2: read: arg count |
mksh | 33 read -r with other backslash escapes stdout: ['one twoethree', 'one\\ twoethree']stderr: |
zsh | 33 read -r with other backslash escapes stdout: ['one twoethree', 'one\\ twoethree']stderr: |
dash | 34 read with line continuation reads multiple physical lines stdout: ['-e onetwo', '-e one\\']stderr: |
dash | 36 read -r with \n stdout: ['', '']stderr: |
mksh | 36 read -r with \n stdout: ['', '']stderr: |
zsh | 36 read -r with \n stdout: ['', '']stderr: |
dash | 37 Read with IFS=$'\n' stdout: [a b c]stderr: |
dash | 40 Read should not respect C escapes. stdout: stderr: |
mksh | 40 Read should not respect C escapes. stdout: d g h e 145 istderr: |
zsh | 40 Read should not respect C escapes. stdout: stderr: |
ash | 40 Read should not respect C escapes. stdout: abcdefghx65 145 istderr: |
dash | 42 read -a reads into array stdout: stderr: |
mksh | 42 read -a reads into array stdout: stderr: |
zsh | 42 read -a reads into array stdout: stderr: |
ash | 42 read -a reads into array stdout: stderr: ash: read: line 6: illegal option -a ash: syntax error: bad substitution |
bash | 43 read -n with invalid arg stdout: status=1stderr: bash: line 1: read: not_a_number: invalid number |
zsh | 43 read -n with invalid arg stdout: stderr: |
dash | 44 read returns correct number of bytes without EOF stdout: stderr: |
zsh | 44 read returns correct number of bytes without EOF stdout: stderr: |
ash | 44 read returns correct number of bytes without EOF stdout: stderr: |
dash | 45 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 |
ash | 45 read -d : (colon-separated records) stdout: v1=a,b,c v1=d,e,f v2= v1=g,h,i v2= v3=stderr: |
dash | 46 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 |
ash | 46 read -d '' (null-separated records) stdout: v1=a,b,cd,e,fg,h,i v1= v2= v1= v2= v3=stderr: |
dash | 47 read -rd stdout: stderr: dash: 1: read: Illegal option -d |
dash | 48 read -d when there's no delimiter stdout: 2 2stderr: dash: 1: read: Illegal option -d dash: 3: read: Illegal option -d |
dash | 49 mapfile stdout: stderr: |
mksh | 49 mapfile stdout: stderr: |
zsh | 49 mapfile stdout: stderr: |
ash | 49 mapfile stdout: stderr: |
osh | 49 mapfile [osh stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
osh_ALT | 49 mapfile [osh_ALT stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
dash | 50 readarray (synonym for mapfile) stdout: stderr: |
mksh | 50 readarray (synonym for mapfile) stdout: stderr: |
zsh | 50 readarray (synonym for mapfile) stdout: stderr: |
ash | 50 readarray (synonym for mapfile) stdout: stderr: |
osh | 50 readarray (synonym for mapfile) [osh stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
osh_ALT | 50 readarray (synonym for mapfile) [osh_ALT stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
dash | 51 mapfile (array name): arr stdout: stderr: |
mksh | 51 mapfile (array name): arr stdout: stderr: |
zsh | 51 mapfile (array name): arr stdout: stderr: |
ash | 51 mapfile (array name): arr stdout: stderr: |
osh | 51 mapfile (array name): arr [osh stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
osh_ALT | 51 mapfile (array name): arr [osh_ALT stdout] Expected 'n=3\n[1\n]\n[3\n]\n[5\n]\n', got '' stdout: stderr: |
dash | 52 mapfile (delimeter): -d delim stdout: stderr: |
mksh | 52 mapfile (delimeter): -d delim stdout: stderr: |
zsh | 52 mapfile (delimeter): -d delim stdout: stderr: |
ash | 52 mapfile (delimeter): -d delim stdout: stderr: |
osh | 52 mapfile (delimeter): -d delim [osh stdout] Expected 'n=3\n[1:]\n[3:]\n[5:]\n', got '' stdout: stderr: |
osh_ALT | 52 mapfile (delimeter): -d delim [osh_ALT stdout] Expected 'n=3\n[1:]\n[3:]\n[5:]\n', got '' stdout: stderr: |
dash | 53 mapfile (delimiter): -d '' (null-separated) stdout: stderr: |
mksh | 53 mapfile (delimiter): -d '' (null-separated) stdout: stderr: |
zsh | 53 mapfile (delimiter): -d '' (null-separated) stdout: stderr: |
ash | 53 mapfile (delimiter): -d '' (null-separated) stdout: stderr: |
osh | 53 mapfile (delimiter): -d '' (null-separated) [osh stdout] Expected 'n=3\n[1]\n[3]\n[5]\n', got '' stdout: stderr: |
osh_ALT | 53 mapfile (delimiter): -d '' (null-separated) [osh_ALT stdout] Expected 'n=3\n[1]\n[3]\n[5]\n', got '' stdout: stderr: |
dash | 54 mapfile (truncate delim): -t stdout: stderr: |
mksh | 54 mapfile (truncate delim): -t stdout: stderr: |
zsh | 54 mapfile (truncate delim): -t stdout: stderr: |
ash | 54 mapfile (truncate delim): -t stdout: stderr: |
osh | 54 mapfile (truncate delim): -t [osh stdout] Expected 'n=3\n[1]\n[3]\n[5]\n', got '' stdout: stderr: |
osh_ALT | 54 mapfile (truncate delim): -t [osh_ALT stdout] Expected 'n=3\n[1]\n[3]\n[5]\n', got '' stdout: stderr: |
dash | 55 mapfile (store position): -O start stdout: stderr: |
mksh | 55 mapfile (store position): -O start stdout: stderr: |
zsh | 55 mapfile (store position): -O start stdout: stderr: |
ash | 55 mapfile (store position): -O start stdout: stderr: |
osh | 55 mapfile (store position): -O start [osh stdout] Expected 'n=5\n[x]\n[y]\n[a0]\n[a1]\n[a2]\n', got '' stdout: stderr: |
osh_ALT | 55 mapfile (store position): -O start [osh_ALT stdout] Expected 'n=5\n[x]\n[y]\n[a0]\n[a1]\n[a2]\n', got '' stdout: stderr: |
dash | 56 mapfile (input range): -s start -n count stdout: stderr: |
mksh | 56 mapfile (input range): -s start -n count stdout: stderr: |
zsh | 56 mapfile (input range): -s start -n count stdout: stderr: |
ash | 56 mapfile (input range): -s start -n count stdout: stderr: |
osh | 56 mapfile (input range): -s start -n count [osh stdout] Expected 'n=3\n[a5]\n[a6]\n[a7]\n', got '' stdout: stderr: |
osh_ALT | 56 mapfile (input range): -s start -n count [osh_ALT stdout] Expected 'n=3\n[a5]\n[a6]\n[a7]\n', got '' stdout: stderr: |