Results for redirect.test.sh

statusbashdashmkshosh
pass 34192934
ok 01021
N-I 0750
BUG 3110
FAIL 0002
total37373737
casebashdashmkshoshdescription
0pass pass pass pass >& and <& are the same
1pass pass pass pass <&
2pass pass pass pass 2>&1 with no command
3pass ok ok pass 2&>1 (is it a redirect or is it like a&>1)
detailsdetails
4pass ok pass pass Nonexistent file
details
5pass pass pass pass Descriptor redirect with spaces
6pass pass pass pass Filename redirect with spaces
7pass pass pass pass Quoted filename redirect with spaces
8BUG ok pass pass Descriptor redirect with filename
detailsdetails
9pass pass pass pass Redirect echo to stderr, and then redirect all of stdout somewhere.
10pass N-I N-I pass Named file descriptor
detailsdetails
11pass BUG pass pass Double digit fd (20> file)
details
12pass pass pass pass : 9> fdleak (OSH regression)
13pass pass BUG pass : 3>&3 (OSH regression)
details
14pass N-I N-I pass : 3>&3-
detailsdetails
15pass pass pass pass 3>&- << EOF (OSH regression: fail to restore fds)
16pass pass pass pass Open file on descriptor 3 and write to it many times
17pass pass pass pass Open file on descriptor 4 and write to it many times
18pass ok pass pass Redirect to empty string
details
19pass ok pass pass Redirect to file descriptor that's not open
details
20pass pass pass pass Open descriptor with exec
21pass pass pass pass Open multiple descriptors with exec
22pass ok pass FAIL >| to clobber
detailsdetails
23pass N-I pass pass &> redirects stdout and stderr
details
24pass N-I N-I FAIL >&word redirects stdout and stderr when word is not a number or -
detailsdetailsdetails
25pass pass pass pass 1>&- to close file descriptor
26pass N-I N-I pass 1>&2- to move file descriptor
detailsdetails
27BUG ok pass pass 1>&2- (Bash bug: fail to restore closed fd)
detailsdetails
28pass pass pass pass <> for read/write
29pass pass pass pass <> for read/write named pipes
30pass N-I pass pass &>> appends stdout and stderr
details
31pass pass pass pass exec redirect then various builtins
32BUG pass pass ok can't mention big file descriptor
detailsdetails
33pass ok ok pass : >/dev/null 2> / (OSH regression: fail to pop fd frame)
detailsdetails
34pass ok pass pass echo foo >&100 (OSH regression: does not fail with invalid fd 100)
details
35pass ok pass pass echo foo >&N where N is first unused fd
details
36pass N-I N-I pass exec {fd}>&- (OSH regression: fails to close fd)
detailsdetails
116 passed, 13 OK, 12 not implemented, 5 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

dash3 2&>1 (is it a redirect or is it like a&>1)

stdout:
status=0
stderr:
dash: 1: 2: not found
mksh3 2&>1 (is it a redirect or is it like a&>1)

stdout:
status=0
stderr:
dash4 Nonexistent file

stdout:
status=2
stderr:
dash: 1: cannot open /home/uke/oil/_tmp/spec-tmp/redirect.test.sh.20839/04-dash/nonexistent.txt: No such file
bash8 Descriptor redirect with filename

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

stdout:
stderr: 
dash: 2: Syntax error: Bad fd number
dash10 Named file descriptor

stdout:
stderr: 
dash: 1: exec: {myfd}: not found
mksh10 Named file descriptor

stdout:
stderr: 
mksh: <stdin>[1]: {myfd}: not found
dash11 Double digit fd (20> file)

stdout:
stderr: 
dash: 1: exec: 20: not found
mksh13 : 3>&3 (OSH regression)

stdout:
stderr: 
dash14 : 3>&3-

stdout:
stderr: 
dash: 2: Syntax error: Bad fd number
mksh14 : 3>&3-

stdout:
stderr: 
mksh: <stdin>[1]: 3>&3- : illegal file descriptor name
dash18 Redirect to empty string

stdout:
result=2
stderr:
dash: 2: cannot create : Directory nonexistent
dash: 5: cannot create : Directory nonexistent
dash19 Redirect to file descriptor that's not open

stdout:
stderr: 
dash: 8: 7: Bad file descriptor
dash22 >| to clobber

stdout:
status=2
XX
ZZ
stderr:
dash: 5: cannot create /home/uke/oil/_tmp/spec-tmp/redirect.test.sh.20839/22-dash/c.txt: File exists
osh22 >| to clobber

[osh stdout] Expected 'status=1\nXX\nZZ\n', got 'status=0\nYY\nZZ\n'

stdout:
status=0
YY
ZZ
stderr:
dash23 &> redirects stdout and stderr

stdout:
STDOUT
stderr:
STDERR
dash24 >&word redirects stdout and stderr when word is not a number or -

stdout:
stderr: 
mksh24 >&word redirects stdout and stderr when word is not a number or -

stdout:
stderr: 
osh24 >&word redirects stdout and stderr when word is not a number or -

[osh stdout] Expected 'STDOUT\nSTDERR\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  stdout_stderr.py >&$tmp
                     ^~~~
[ stdin ]:5: Invalid descriptor 'osh-21075.txt'.  Expected D, -, or D- where D is an integer
grep: osh-21075.txt: No such file or directory
grep: osh-21075.txt: No such file or directory
dash26 1>&2- to move file descriptor

stdout:
stderr: 
dash: 4: Syntax error: Bad fd number
mksh26 1>&2- to move file descriptor

stdout:
stderr: 
mksh: <stdin>[3]: 6>&5- : illegal file descriptor name
bash27 1>&2- (Bash bug: fail to restore closed fd)

stdout:
hello
stderr:
bash: line 19: 7: Bad file descriptor
dash27 1>&2- (Bash bug: fail to restore closed fd)

stdout:
stderr: 
dash: 19: Syntax error: Bad fd number
dash30 &>> appends stdout and stderr

stdout:
stderr: 
bash32 can't mention big file descriptor

stdout:
hi
hi
hi
stderr:
osh32 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr:
dash33 : >/dev/null 2> / (OSH regression: fail to pop fd frame)

stdout:
stderr: 
dash: 1: cannot create /: Is a directory
mksh33 : >/dev/null 2> / (OSH regression: fail to pop fd frame)

stdout:
stderr: 
mksh: <stdin>[1]: can't create /: Is a directory
dash34 echo foo >&100 (OSH regression: does not fail with invalid fd 100)

stdout:
stderr: 
dash: 3: Syntax error: Bad fd number
dash35 echo foo >&N where N is first unused fd

stdout:
stderr: 
dash: 8: Syntax error: Bad function name
dash36 exec {fd}>&- (OSH regression: fails to close fd)

stdout:
stderr: 
mksh36 exec {fd}>&- (OSH regression: fails to close fd)

stdout:
stderr: