| status | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | |
| pass | 22 | 19 | 20 | 18 | 21 | 21 | 19 | 16 | 21 | 23 | |
| ok | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |
| N-I | 0 | 4 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | |
| BUG | 1 | 0 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | |
| FAIL | 0 | 0 | 1 | 0 | 0 | 2 | 4 | 7 | 2 | 0 | |
| total | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | 23 | |
| case | bash | dash | ash | zsh | mksh | ksh | toysh | sush | brush | osh | description |
| 0 | pass | pass | pass | BUG | pass | pass | pass | FAIL | pass | pass | >$file touches a file |
| details | details | ||||||||||
| 1 | pass | N-I | N-I | pass | pass | pass | pass | FAIL | pass | pass | $(< $file) yields the contents of the file |
| details | details | details | |||||||||
| 2 | pass | N-I | N-I | pass | pass | pass | FAIL | FAIL | pass | pass | `< $file` behaves like $(< file) |
| details | details | details | details | ||||||||
| 3 | pass | pass | pass | BUG | pass | pass | pass | pass | pass | pass | $(< file; end) is not a special case |
| details | |||||||||||
| 4 | pass | pass | pass | BUG | pass | pass | pass | FAIL | pass | pass | < file in pipeline and subshell doesn't work |
| details | details | ||||||||||
| 5 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Leading redirect in a simple command |
| 6 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Redirect in the middle of a simple command |
| 7 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Redirect in command sub |
| 8 | pass | pass | pass | BUG | pass | pass | FAIL | pass | pass | pass | Redirect in the middle of two assignments |
| details | details | ||||||||||
| 9 | BUG | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | Redirect in assignment |
| details | details | ||||||||||
| 10 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Redirect in function body |
| 11 | pass | N-I | pass | pass | pass | pass | pass | pass | pass | pass | Redirect in function body is evaluated multiple times |
| details | |||||||||||
| 12 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Redirect in function body AND function call |
| 13 | pass | N-I | FAIL | pass | N-I | FAIL | FAIL | FAIL | FAIL | pass | redirect bash extensions: [[ (( for (( |
| details | details | details | details | details | details | details | |||||
| 14 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | redirect if |
| 15 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | redirect case |
| 16 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | redirect while |
| 17 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | redirect for loop |
| 18 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | redirect subshell |
| 19 | pass | pass | pass | BUG | ok | FAIL | pass | FAIL | FAIL | pass | Prefix redirect for loop -- not allowed |
| details | details | details | details | details | |||||||
| 20 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Brace group redirect |
| 21 | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | Redirect function stdout |
| 22 | pass | pass | pass | pass | pass | pass | FAIL | pass | pass | pass | Nested function stdout redirect |
| details |
200 passed, 1 OK, 7 not implemented, 6 BUG, 16 failed, 0 timeouts, 0 cases skipped
| zsh | 0 >$file touches a file stdout: status=1stderr: |
| sush | 0 >$file touches a file [sush stdout] Expected 'status=1\nstatus=0\n' Got 'status=1\nstatus=1\n' stdout: status=1 status=1stderr: |
| dash | 1 $(< $file) yields the contents of the file stdout: ['']stderr: |
| ash | 1 $(< $file) yields the contents of the file stdout: ['']stderr: |
| sush | 1 $(< $file) yields the contents of the file [sush stdout] Expected "['2\\n3']\n" Got "['2 3']\n" stdout: ['2 3']stderr: |
| dash | 2 `< $file` behaves like $(< file) stdout: []stderr: |
| ash | 2 `< $file` behaves like $(< file) stdout: []stderr: |
| toysh | 2 `< $file` behaves like $(< file) [toysh stdout] Expected '[7\n8]\n' Got '' [toysh status] Expected 0 Got -11 stdout: stderr: |
| sush | 2 `< $file` behaves like $(< file) [sush stdout] Expected '[7\n8]\n' Got '[]\n' stdout: []stderr: |
| zsh | 3 $(< file; end) is not a special case stdout: begin 5 6 --- 5 6 end --- 5 6 5 6 ---stderr: |
| zsh | 4 < file in pipeline and subshell doesn't work stdout: foo FOO endstderr: |
| sush | 4 < file in pipeline and subshell doesn't work [sush stdout] Expected 'end\n' Got '' [sush status] Expected 0 Got -6 stdout: stderr: thread 'main' panicked at src/elements/pipeline.rs:52:32: called `Option::unwrap()` on a `None` value note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace |
| zsh | 8 Redirect in the middle of two assignments stdout: stderr: |
| toysh | 8 Redirect in the middle of two assignments [toysh stdout] Expected 'bar\nfoo\n' Got '' stdout: stderr: sh: BAR=bar: No such file or directory |
| bash | 9 Redirect in assignment stdout: FILE= FOO=stderr: foo |
| sush | 9 Redirect in assignment [sush stdout] Expected 'FILE=\nfoo\nFOO=\n' Got 'FILE=\nFOO=\n' stdout: FILE= FOO=stderr: foo cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/redirect-command.test.sh/09-sush/no-command.txt: No such file or directory |
| dash | 11 Redirect in function body is evaluated multiple times stdout: stderr: dash: 2: arithmetic expression: expecting primary: "i++" |
| dash | 13 redirect bash extensions: [[ (( for (( stdout: stderr: |
| ash | 13 redirect bash extensions: [[ (( for (( [ash stdout] Expected '0 dbracket\n0 dparen\n1 for-expr\n1 total\n' Got '' [ash status] Expected 0 Got 2 stdout: stderr: ash: 42: not found ash: syntax error: bad for loop variable |
| mksh | 13 redirect bash extensions: [[ (( for (( stdout: stderr: |
| ksh | 13 redirect bash extensions: [[ (( for (( [ksh stdout] Expected '0 dbracket\n0 dparen\n1 for-expr\n1 total\n' Got '' [ksh status] Expected 0 Got 1 stdout: stderr: E: ksh: <stdin>[9]: syntax error: unexpected '(('
|
| toysh | 13 redirect bash extensions: [[ (( for (( [toysh stdout] Expected '0 dbracket\n0 dparen\n1 for-expr\n1 total\n' Got '' [toysh status] Expected 0 Got -6 stdout: stderr: munmap_chunk(): invalid pointer |
| sush | 13 redirect bash extensions: [[ (( for (( [sush stdout] Expected '0 dbracket\n0 dparen\n1 for-expr\n1 total\n' Got '0 dbracket\n1 for-expr\n1 total\n' [sush status] Expected 0 Got 1 stdout: 0 dbracket 1 for-expr 1 totalstderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: syntax error near unexpected token: > wc: dparen: No such file or directory |
| brush | 13 redirect bash extensions: [[ (( for (( [brush stdout] Expected '0 dbracket\n0 dparen\n1 for-expr\n1 total\n' Got '0 dparen\n1 for-expr\n1 total\n' stdout: 0 dparen 1 for-expr 1 totalstderr: [31merror:[39m main: syntax error near token `>' (line 1 col 13) wc: dbracket: No such file or directory |
| zsh | 19 Prefix redirect for loop -- not allowed stdout: 1 2 3stderr: |
| mksh | 19 Prefix redirect for loop -- not allowed stdout: stderr: mksh: <stdin>[1]: for: not found mksh: <stdin>[2]: syntax error: 'do' unexpected |
| ksh | 19 Prefix redirect for loop -- not allowed [ksh status] Expected 2 Got 1 stdout: stderr: E: ksh: <stdin>[1]: for: inaccessible or not found E: ksh: <stdin>[2]: syntax error: unexpected 'do' |
| sush | 19 Prefix redirect for loop -- not allowed [sush status] Expected 2 Got 1 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: syntax error near unexpected token: i /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: syntax error near unexpected token: do /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: syntax error near unexpected token: done cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/redirect-command.test.sh/19-sush/redirect2.txt: No such file or directory |
| brush | 19 Prefix redirect for loop -- not allowed [brush status] Expected 2 Got 1 stdout: stderr: [31merror:[39m main: syntax error near token `i' (line 1 col 25) [31merror:[39m main: syntax error near token ` ' (line 1 col 3) [31merror:[39m main: syntax error near token ` ' (line 1 col 5) cat: /home/andy/git/oils-for-unix/oils/_tmp/spec-tmp/redirect-command.test.sh/19-brush/redirect2.txt: No such file or directory |
| toysh | 22 Nested function stdout redirect [toysh stdout] Expected 'i1\ni2\n--\no1\no2\n' Got 'i1\ni2\n\no1\no2\n' stdout: i1 i2 o1 o2stderr: |