Results for redirect-command.test.sh

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

Details on runs that didn't PASS

zsh0 >$file touches a file

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

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: 
brush1 $(< $file) yields the contents of the file

[brush stdout] Expected 'FOO\n', got '\n'

stdout:
stderr: 
zsh2 $(< file) with more statements

[zsh stdout] Expected 'begin\nFOO\n---\nFOO\nend\n---\nFOO\nFOO\n---\n', got 'begin\n---\nend\n---\n\n---\n'

stdout:
begin
---
end
---

---
stderr:
zsh: no such file or directory: myfile
zsh: no such file or directory: myfile
zsh: no such file or directory: myfile
zsh: no such file or directory: myfile
zsh3 < file in pipeline and subshell doesn't work

[zsh stdout] Expected 'end\n', got 'foo\nFOO\nend\n'

stdout:
foo
FOO
end
stderr:
sush3 < 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
zsh7 Redirect in the middle of two assignments

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

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

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

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

stdout:
FILE=
FOO=
stderr:
foo
sush8 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.4049768/08-sush/no-command.txt: No such file or directory
dash10 Redirect in function body is evaluated multiple times

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

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

stdout:
stderr: 
ksh12 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 '(('
toysh12 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
sush12 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
brush12 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
zsh18 Prefix redirect for loop -- not allowed

[zsh status] Expected 2, got 0

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

stdout:
stderr: 
mksh: <stdin>[1]: for: not found
mksh: <stdin>[2]: syntax error: 'do' unexpected
ksh18 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'
sush18 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.4049768/18-sush/redirect2.txt: No such file or directory
brush18 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.4049768/18-brush/redirect2.txt: No such file or directory
toysh21 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: