redirect-command () { run-file redirect-command "$@" } run-file () { local spec_name=$1; shift; sh-spec spec/$spec_name.test.sh --compare-shells --oils-bin-dir $PWD/bin "$@" } redirect-command: spec test case results

Results for redirect-command.test.sh

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

Details on runs that didn't PASS

dash1 $(< $file) yields the contents of the file

stdout:
stderr: 
bash8 Redirect in assignment

stdout:
FILE=
FOO=
stderr:
foo
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: 
mksh12 redirect bash extensions: [[ (( for ((

stdout:
stderr: 
mksh18 Prefix redirect for loop -- not allowed

stdout:
stderr: 
mksh: <stdin>[1]: for: not found
mksh: <stdin>[2]: syntax error: 'do' unexpected