spec test index / oilshell.org
status | dash | bash | mksh | zsh | ash | osh | osh_ALT | |
pass | 22 | 61 | 47 | 43 | 53 | 63 | 63 | |
ok | 4 | 3 | 4 | 2 | 0 | 0 | 0 | |
N-I | 35 | 0 | 7 | 12 | 8 | 0 | 0 | |
BUG | 5 | 2 | 8 | 9 | 5 | 0 | 0 | |
FAIL | 0 | 0 | 0 | 0 | 0 | 3 | 3 | |
total | 66 | 66 | 66 | 66 | 66 | 66 | 66 | |
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 | ok | pass | pass | pass | pass | pass | pass | read /dev/null |
details | ||||||||
27 | BUG | pass | pass | pass | pass | pass | pass | read with zero args |
details | ||||||||
28 | pass | pass | pass | pass | pass | pass | pass | Read builtin with no newline. |
29 | pass | pass | pass | pass | pass | pass | pass | Read builtin with multiple variables |
30 | pass | pass | pass | pass | pass | pass | pass | Read builtin with not enough variables |
31 | N-I | pass | pass | N-I | pass | pass | pass | Read -n (with $REPLY) |
details | details | |||||||
32 | N-I | pass | pass | N-I | pass | pass | pass | IFS= read -n (OSH regression: value saved in tempenv) |
details | details | |||||||
33 | pass | ok | pass | N-I | pass | pass | pass | read -n with invalid arg |
details | details | |||||||
34 | N-I | pass | pass | N-I | N-I | pass | pass | read -n from pipe |
details | details | details | ||||||
35 | N-I | pass | pass | pass | pass | pass | pass | Read uses $REPLY (without -n) |
details | ||||||||
36 | pass | pass | pass | pass | pass | pass | pass | read -r ignores backslashes |
37 | pass | pass | BUG | BUG | pass | pass | pass | read -r with other backslash escapes |
details | details | |||||||
38 | N-I | pass | pass | pass | pass | pass | pass | read with line continuation reads multiple physical lines |
details | ||||||||
39 | pass | pass | pass | pass | pass | pass | pass | read multiple vars spanning many lines |
40 | BUG | pass | BUG | BUG | pass | pass | pass | read -r with \n |
details | details | details | ||||||
41 | N-I | pass | pass | N-I | pass | pass | pass | read -s from pipe, not a terminal |
details | details | |||||||
42 | N-I | pass | pass | pass | pass | pass | pass | Read with IFS=$'\n' |
details | ||||||||
43 | pass | pass | pass | pass | pass | pass | pass | Read multiple lines with IFS=: |
44 | pass | pass | pass | pass | pass | pass | pass | Read with IFS='' |
45 | BUG | pass | BUG | BUG | BUG | pass | pass | Read should not respect C escapes. |
details | details | details | details | |||||
46 | pass | pass | pass | pass | pass | pass | pass | Read builtin uses dynamic scope |
47 | N-I | pass | N-I | N-I | N-I | pass | pass | read -a reads into array |
details | details | details | details | |||||
48 | N-I | pass | pass | pass | pass | pass | pass | read -d : (colon-separated records) |
details | ||||||||
49 | N-I | pass | pass | pass | pass | pass | pass | read -d '' (null-separated records) |
details | ||||||||
50 | N-I | pass | pass | pass | pass | pass | pass | read -rd |
details | ||||||||
51 | N-I | pass | pass | pass | pass | pass | pass | read -d when there's no delimiter |
details | ||||||||
52 | N-I | pass | N-I | N-I | pass | pass | pass | read -t 0 tests if input is available |
details | details | details | ||||||
53 | N-I | pass | BUG | BUG | pass | FAIL | FAIL | read -t 0.5 |
details | details | details | details | details | ||||
54 | pass | BUG | pass | BUG | pass | pass | pass | read -t -0.5 is invalid |
details | details | |||||||
55 | N-I | pass | N-I | pass | pass | FAIL | FAIL | read -u |
details | details | details | details | |||||
56 | pass | ok | pass | ok | pass | pass | pass | read -u syntax error |
details | details | |||||||
57 | N-I | pass | ok | N-I | N-I | FAIL | FAIL | read -N doesn't respect delimiter, while read -n does |
details | details | details | details | details | details | |||
58 | N-I | pass | N-I | N-I | pass | pass | pass | read -p (not fully tested) |
details | details | details | ||||||
59 | pass | ok | BUG | BUG | pass | pass | pass | read usage |
details | details | details | ||||||
60 | N-I | pass | pass | N-I | pass | pass | pass | read with smooshed args |
details | details | |||||||
61 | N-I | pass | N-I | N-I | pass | pass | pass | read -r -d '' for NUL strings, e.g. find -print0 |
details | details | details | ||||||
62 | pass | pass | ok | pass | pass | pass | pass | redirection from directory is non-fatal error) |
details | ||||||||
63 | N-I | pass | ok | pass | N-I | pass | pass | read -n from directory |
details | details | details | ||||||
64 | N-I | BUG | N-I | N-I | N-I | pass | pass | mapfile from directory (bash doesn't handle errors) |
details | details | details | details | details | ||||
65 | ok | pass | pass | pass | pass | pass | pass | Redirect to directory |
details |
352 passed, 13 OK, 62 not implemented, 29 BUG, 3 failed, 0 timeouts, 0 cases skipped 3 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: 5: read: arg count |
dash | 26 read /dev/null stdout: 2stderr: dash: 1: read: Illegal option -n |
dash | 27 read with zero args stdout: status=2stderr: dash: 1: read: arg count |
dash | 31 Read -n (with $REPLY) stdout: []stderr: dash: 2: read: Illegal option -n dash: 3: read: Illegal option -n |
zsh | 31 Read -n (with $REPLY) stdout: []stderr: |
dash | 32 IFS= read -n (OSH regression: value saved in tempenv) stdout: ['']stderr: dash: 2: read: Illegal option -n |
zsh | 32 IFS= read -n (OSH regression: value saved in tempenv) stdout: ['']stderr: |
bash | 33 read -n with invalid arg stdout: status=1stderr: bash: line 1: read: not_a_number: invalid number |
zsh | 33 read -n with invalid arg stdout: stderr: |
dash | 34 read -n from pipe stdout: stderr: |
zsh | 34 read -n from pipe stdout: stderr: |
ash | 34 read -n from pipe stdout: stderr: |
dash | 35 Read uses $REPLY (without -n) stdout: stderr: dash: 2: read: arg count |
mksh | 37 read -r with other backslash escapes stdout: ['one twoethree', 'one\\ twoethree']stderr: |
zsh | 37 read -r with other backslash escapes stdout: ['one twoethree', 'one\\ twoethree']stderr: |
dash | 38 read with line continuation reads multiple physical lines stdout: ['-e onetwo', '-e one\\']stderr: |
dash | 40 read -r with \n stdout: ['', '']stderr: |
mksh | 40 read -r with \n stdout: ['', '']stderr: |
zsh | 40 read -r with \n stdout: ['', '']stderr: |
dash | 41 read -s from pipe, not a terminal stdout: stderr: |
zsh | 41 read -s from pipe, not a terminal stdout: stderr: |
dash | 42 Read with IFS=$'\n' stdout: [a b c]stderr: |
dash | 45 Read should not respect C escapes. stdout: stderr: |
mksh | 45 Read should not respect C escapes. stdout: d g h e 145 istderr: |
zsh | 45 Read should not respect C escapes. stdout: stderr: |
ash | 45 Read should not respect C escapes. stdout: abcdefghx65 145 istderr: |
dash | 47 read -a reads into array stdout: stderr: |
mksh | 47 read -a reads into array stdout: stderr: |
zsh | 47 read -a reads into array stdout: stderr: |
ash | 47 read -a reads into array stdout: stderr: ash: read: line 7: illegal option -a ash: syntax error: bad substitution |
dash | 48 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 |
dash | 49 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 |
dash | 50 read -rd stdout: stderr: dash: 1: read: Illegal option -d |
dash | 51 read -d when there's no delimiter stdout: 2 2stderr: dash: 1: read: Illegal option -d dash: 3: read: Illegal option -d |
dash | 52 read -t 0 tests if input is available stdout: stderr: |
mksh | 52 read -t 0 tests if input is available stdout: stderr: |
zsh | 52 read -t 0 tests if input is available stdout: stderr: |
dash | 53 read -t 0.5 stdout: stderr: |
mksh | 53 read -t 0.5 stdout: 1stderr: |
zsh | 53 read -t 0.5 stdout: 1stderr: |
osh | 53 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) |
osh_ALT | 53 read -t 0.5 [osh_ALT stdout] Expected '1\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: read -t 0.5 < /dev/null ^~~~ [ stdin ]:3: fatal: read -t isn't implemented (except t=0) |
bash | 54 read -t -0.5 is invalid stdout: 1stderr: |
zsh | 54 read -t -0.5 is invalid stdout: stderr: zsh: not an identifier: -0.5 |
dash | 55 read -u stdout: stderr: |
mksh | 55 read -u stdout: stderr: |
osh | 55 read -u [osh stdout] Expected 'reply=hi\n', got 'reply=\n' stdout: reply=stderr: |
osh_ALT | 55 read -u [osh_ALT stdout] Expected 'reply=hi\n', got 'reply=\n' stdout: reply=stderr: |
bash | 56 read -u syntax error stdout: status=1stderr: bash: line 1: read: -3: invalid file descriptor specification |
zsh | 56 read -u syntax error stdout: status=1stderr: |
dash | 57 read -N doesn't respect delimiter, while read -n does stdout: stderr: |
mksh | 57 read -N doesn't respect delimiter, while read -n does stdout: fooba foobastderr: |
zsh | 57 read -N doesn't respect delimiter, while read -n does stdout: stderr: |
ash | 57 read -N doesn't respect delimiter, while read -n does stdout: stderr: |
osh | 57 read -N doesn't respect delimiter, while read -n does [osh stdout] Expected 'foo\nfooba\n', got 'fooba\nfooba\n' stdout: fooba foobastderr: echo foobar | { read -N 5 -d b; echo $REPLY; } ^~ [ stdin ]:4: 'read' doesn't accept flag -N |
osh_ALT | 57 read -N doesn't respect delimiter, while read -n does [osh_ALT stdout] Expected 'foo\nfooba\n', got 'fooba\nfooba\n' stdout: fooba foobastderr: echo foobar | { read -N 5 -d b; echo $REPLY; } ^~ [ stdin ]:4: 'read' doesn't accept flag -N |
dash | 58 read -p (not fully tested) stdout: stderr: |
mksh | 58 read -p (not fully tested) stdout: stderr: |
zsh | 58 read -p (not fully tested) stdout: stderr: |
bash | 59 read usage stdout: status=1stderr: bash: line 1: read: -1: invalid number |
mksh | 59 read usage stdout: stderr: |
zsh | 59 read usage stdout: stderr: zsh: not an identifier: -1 |
dash | 60 read with smooshed args stdout: var=stderr: dash: 1: read: Illegal option -n |
zsh | 60 read with smooshed args stdout: var=stderr: zsh: bad option: -1 |
dash | 61 read -r -d '' for NUL strings, e.g. find -print0 stdout: stderr: |
mksh | 61 read -r -d '' for NUL strings, e.g. find -print0 stdout: stderr: |
zsh | 61 read -r -d '' for NUL strings, e.g. find -print0 stdout: stderr: |
mksh | 62 redirection from directory is non-fatal error) stdout: stderr: |
dash | 63 read -n from directory stdout: stderr: |
mksh | 63 read -n from directory stdout: stderr: |
ash | 63 read -n from directory stdout: stderr: |
dash | 64 mapfile from directory (bash doesn't handle errors) stdout: stderr: |
bash | 64 mapfile from directory (bash doesn't handle errors) stdout: status=0stderr: |
mksh | 64 mapfile from directory (bash doesn't handle errors) stdout: stderr: |
zsh | 64 mapfile from directory (bash doesn't handle errors) stdout: stderr: |
ash | 64 mapfile from directory (bash doesn't handle errors) stdout: stderr: |
dash | 65 Redirect to directory stdout: status=2 status=2stderr: dash: 3: cannot create ./dir: Is a directory dash: 5: cannot create ./dir: Is a directory |