Results for redirect.test.sh

casedashbashmkshoshdescription
0pass pass pass pass Leading redirect
1pass pass pass pass No command
2pass pass pass pass Redirect in subshell
3pass BUG pass pass Redirect in assignment
details
4pass pass pass pass Redirect in function body.
5N-I pass pass pass Redirect in function body is evaluated multiple times
details
6pass pass pass pass Redirect in function body AND function call
7pass pass pass pass Descriptor redirect with spaces
8pass pass pass pass Filename redirect with spaces
9pass pass pass pass Quoted filename redirect with spaces
10ok BUG pass FAIL Descriptor redirect with filename
detailsdetailsdetails
11pass pass pass pass redirect for loop
12pass pass pass pass redirect subshell
13pass pass ok FAIL Prefix redirect for loop -- not allowed
detailsdetails
14pass pass pass pass Brace group redirect
15pass pass pass pass Redirect echo to stderr, and then redirect all of stdout somewhere.
16pass pass pass pass Redirect in the middle of two assignments
17pass pass pass pass Redirect in the middle of a command
18N-I pass N-I FAIL Named file descriptor
detailsdetailsdetails
19pass pass pass pass Redirect function stdout
20pass pass pass pass Nested function stdout redirect
21ok pass pass FAIL Redirect to empty string
detailsdetails

76 passed, 3 ok, 3 known unimplemented, 2 known bugs, 4 failed, 0 skipped

Details on runs that didn't PASS

bash3 Redirect in assignment

stdout:
FILE=
FOO=
stderr:
foo
dash5 Redirect in function body is evaluated multiple times

stdout:
stderr: 
/bin/dash: 2: arithmetic expression: expecting primary: "i++"
dash10 Descriptor redirect with filename

stdout:
stderr: 
/bin/dash: 2: Syntax error: Bad fd number
bash10 Descriptor redirect with filename

stdout:
status=0
stderr:
osh10 Descriptor redirect with filename

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

stdout:
one
status=0
stderr:
osh warning: Redirect descriptor should look like an integer, got (Str s:/home/andy/git/oil/test/../_tmp/spec-tmp/nonexistent-filename__)
mksh13 Prefix redirect for loop -- not allowed

stdout:
stderr: 
/bin/mksh: <stdin>[1]: for: not found
/bin/mksh: <stdin>[2]: syntax error: 'do' unexpected
osh13 Prefix redirect for loop -- not allowed

[osh status] Expected 2, got 127

stdout:
stderr: 
Unexpected error in execvpe('for', ['for', 'i', 'in', '1', '2', '3'], ...): [Errno 2] No such file or directory
dash18 Named file descriptor

stdout:
stderr: 
/bin/dash: 1: exec: {myfd}: not found
mksh18 Named file descriptor

stdout:
stderr: 
/bin/mksh: <stdin>[1]: {myfd}: not found
osh18 Named file descriptor

[osh stdout] Expected 'named-fd-contents\n', got ''
[osh status] Expected 0, got 127

stdout:
stderr: 
Unexpected error in execvpe('{myfd}', ['{myfd}'], ...): [Errno 2] No such file or directory
dash21 Redirect to empty string

stdout:
result=2
stderr:
/bin/dash: 2: cannot create : Directory nonexistent
/bin/dash: 5: cannot create : Directory nonexistent
osh21 Redirect to empty string

[osh stdout] Expected 'result=1\n', got 's\nresult=0\ns\nDONE\n'
[osh status] Expected 1, got 0

stdout:
s
result=0
s
DONE
stderr:
osh warning: Redirect filename can't be empty
osh warning: Redirect filename can't be empty