Results for redirect-command.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 22192018212119161923
ok 0000100000
N-I 0420100000
BUG 1005000000
FAIL 0010024740
total23232323232323232323
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass pass pass BUG pass pass pass FAIL pass pass >$file touches a file
detailsdetails
1pass N-I N-I pass pass pass pass FAIL FAIL pass $(< $file) yields the contents of the file
detailsdetailsdetailsdetails
2pass N-I N-I pass pass pass FAIL FAIL FAIL pass `< $file` behaves like $(< file)
detailsdetailsdetailsdetailsdetails
3pass pass pass BUG pass pass pass pass pass pass $(< file; end) is not a special case
details
4pass pass pass BUG pass pass pass FAIL pass pass < file in pipeline and subshell doesn't work
detailsdetails
5pass pass pass pass pass pass pass pass pass pass Leading redirect in a simple command
6pass pass pass pass pass pass pass pass pass pass Redirect in the middle of a simple command
7pass pass pass pass pass pass pass pass pass pass Redirect in command sub
8pass pass pass BUG pass pass FAIL pass pass pass Redirect in the middle of two assignments
detailsdetails
9BUG pass pass pass pass pass pass FAIL pass pass Redirect in assignment
detailsdetails
10pass pass pass pass pass pass pass pass pass pass Redirect in function body
11pass N-I pass pass pass pass pass pass pass pass Redirect in function body is evaluated multiple times
details
12pass pass pass pass pass pass pass pass pass pass Redirect in function body AND function call
13pass N-I FAIL pass N-I FAIL FAIL FAIL FAIL pass redirect bash extensions: [[ (( for ((
detailsdetailsdetailsdetailsdetailsdetailsdetails
14pass pass pass pass pass pass pass pass pass pass redirect if
15pass pass pass pass pass pass pass pass pass pass redirect case
16pass pass pass pass pass pass pass pass pass pass redirect while
17pass pass pass pass pass pass pass pass pass pass redirect for loop
18pass pass pass pass pass pass pass pass pass pass redirect subshell
19pass pass pass BUG ok FAIL pass FAIL FAIL pass Prefix redirect for loop -- not allowed
detailsdetailsdetailsdetailsdetails
20pass pass pass pass pass pass pass pass pass pass Brace group redirect
21pass pass pass pass pass pass pass pass pass pass Redirect function stdout
22pass pass pass pass pass pass FAIL pass pass pass Nested function stdout redirect
details
198 passed, 1 OK, 7 not implemented, 6 BUG, 18 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

zsh0 >$file touches a file

stdout:
status=1
stderr:
sush0 >$file touches a file

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

stdout:
status=1
status=1
stderr:
dash1 $(< $file) yields the contents of the file

stdout:
['']
stderr:
ash1 $(< $file) yields the contents of the file

stdout:
['']
stderr:
sush1 $(< $file) yields the contents of the file

[sush stdout] Expected "['2\\n3']\n", got "['2 3']\n"

stdout:
['2 3']
stderr:
brush1 $(< $file) yields the contents of the file

[brush stdout] Expected "['2\\n3']\n", got "['']\n"

stdout:
['']
stderr:
dash2 `< $file` behaves like $(< file)

stdout:
[]
stderr:
ash2 `< $file` behaves like $(< file)

stdout:
[]
stderr:
toysh2 `< $file` behaves like $(< file)

[toysh stdout] Expected '[7\n8]\n', got ''
[toysh status] Expected 0, got -11

stdout:
stderr: 
sush2 `< $file` behaves like $(< file)

[sush stdout] Expected '[7\n8]\n', got '[]\n'

stdout:
[]
stderr:
brush2 `< $file` behaves like $(< file)

[brush stdout] Expected '[7\n8]\n', got '[]\n'

stdout:
[]
stderr:
zsh3 $(< file; end) is not a special case

stdout:
begin
5
6
---
5
6
end
---
5
6
5
6
---
stderr:
zsh4 < file in pipeline and subshell doesn't work

stdout:
foo
FOO
end
stderr:
sush4 < file in pipeline and subshell doesn't work

[sush stdout] Expected 'end\n', got ''
[sush status] Expected 0, got 101

stdout:
stderr: 
thread 'main' panicked at src/elements/pipeline.rs:47:32:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh8 Redirect in the middle of two assignments

stdout:
stderr: 
toysh8 Redirect in the middle of two assignments

[toysh stdout] Expected 'bar\nfoo\n', got ''

stdout:
stderr: 
sh: BAR=bar: No such file or directory
bash9 Redirect in assignment

stdout:
FILE=
FOO=
stderr:
foo
sush9 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
dash11 Redirect in function body is evaluated multiple times

stdout:
stderr: 
dash: 2: arithmetic expression: expecting primary: "i++"
dash13 redirect bash extensions: [[ (( for ((

stdout:
stderr: 
ash13 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
mksh13 redirect bash extensions: [[ (( for ((

stdout:
stderr: 
ksh13 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 '(('
toysh13 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
sush13 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 total
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 8: Unexpected token: >
wc: dparen: No such file or directory
brush13 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 total
stderr:
ERROR main: syntax error near token `>' (line 1 col 13)
wc: dbracket: No such file or directory
zsh19 Prefix redirect for loop -- not allowed

stdout:
1
2
3
stderr:
mksh19 Prefix redirect for loop -- not allowed

stdout:
stderr: 
mksh: <stdin>[1]: for: not found
mksh: <stdin>[2]: syntax error: 'do' unexpected
ksh19 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'
sush19 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: Unexpected token: i
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: Unexpected token: do

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: 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
brush19 Prefix redirect for loop -- not allowed

[brush status] Expected 2, got 1

stdout:
stderr: 
ERROR main: syntax error near token `i' (line 1 col 25)
ERROR main: syntax error near token `
' (line 1 col 3)
ERROR 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
toysh22 Nested function stdout redirect

[toysh stdout] Expected 'i1\ni2\n--\no1\no2\n', got 'i1\ni2\n\no1\no2\n'

stdout:
i1
i2

o1
o2
stderr: