Results for redirect.test.sh

statusdashbashmkshoshosh_ALT
pass 3651465353
ok 100411
N-I 80400
BUG 14100
FAIL 00011
total5555555555
casedashbashmkshoshosh_ALTdescription
0pass pass pass pass pass >&
1pass pass pass pass pass <&
2pass pass pass pass pass Leading redirect
3ok pass pass pass pass Nonexistent file
details
4pass pass pass pass pass Redirect in command sub
5pass BUG pass pass pass Redirect in assignment
details
6pass pass pass pass pass Redirect in function body.
7ok pass pass pass pass Bad redirects in function body
details
8N-I pass pass pass pass Redirect in function body is evaluated multiple times
details
9pass pass pass pass pass Redirect in function body AND function call
10pass pass pass pass pass Descriptor redirect with spaces
11pass pass pass pass pass Filename redirect with spaces
12pass pass pass pass pass Quoted filename redirect with spaces
13ok BUG pass pass pass Descriptor redirect with filename
detailsdetails
14pass pass pass pass pass redirect for loop
15pass pass pass pass pass redirect subshell
16pass pass ok pass pass Prefix redirect for loop -- not allowed
details
17pass pass pass pass pass Brace group redirect
18pass pass pass pass pass Redirect echo to stderr, and then redirect all of stdout somewhere.
19pass pass pass pass pass Redirect in the middle of two assignments
20pass pass pass pass pass Redirect in the middle of a command
21N-I pass N-I pass pass Named file descriptor
detailsdetails
22BUG pass pass pass pass Double digit fd (20> file)
details
23pass pass pass pass pass : 9> fdleak (OSH regression)
24pass pass BUG pass pass : 3>&3 (OSH regression)
details
25N-I pass N-I pass pass : 3>&3-
detailsdetails
26pass pass pass pass pass 3>&- << EOF (OSH regression: fail to restore fds)
27pass pass pass pass pass Open file on descriptor 3 and write to it many times
28pass pass pass pass pass Open file on descriptor 4 and write to it many times
29pass pass pass pass pass Redirect function stdout
30pass pass pass pass pass Nested function stdout redirect
31ok pass pass pass pass Redirect to empty string
details
32ok pass pass pass pass Redirect to file descriptor that's not open
details
33pass pass pass pass pass Open descriptor with exec
34pass pass pass pass pass Open multiple descriptors with exec
35ok pass pass FAIL FAIL >| to clobber
detailsdetailsdetails
36N-I pass pass pass pass &> redirects stdout and stderr
details
37pass pass pass pass pass 1>&- to close file descriptor
38N-I pass N-I pass pass 1>&2- to move file descriptor
detailsdetails
39pass BUG ok pass pass 1>&2- (Bash bug: fail to restore closed fd)
detailsdetails
40pass pass pass pass pass <> for read/write
41pass pass pass pass pass <> for read/write named pipes
42N-I pass pass pass pass &>> appends stdout and stderr
details
43pass pass pass pass pass exec redirect then various builtins
44pass pass pass pass pass >$file touches a file
45N-I pass pass pass pass $(< $file) yields the contents of the file
details
46pass pass pass pass pass $(< file) with more statements
47pass pass pass pass pass < file in pipeline and subshell doesn't work
48pass pass pass pass pass 2>&1 with no command
49ok pass ok pass pass 2&>1 (is it a redirect or is it like a&>1)
detailsdetails
50pass BUG pass ok ok can't mention big file descriptor
detailsdetailsdetails
51ok pass ok pass pass : >/dev/null 2> / (OSH regression: fail to pop fd frame)
detailsdetails
52ok pass pass pass pass echo foo >&100 (OSH regression: does not fail with invalid fd 100)
details
53ok pass pass pass pass echo foo >&N where N is first unused fd
details
54N-I pass N-I pass pass exec {fd}>&- (OSH regression: fails to close fd)
detailsdetails
239 passed, 16 OK, 12 not implemented, 6 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

dash3 Nonexistent file

stdout:
status=2
stderr:
dash: 1: cannot open /home/andy/git/oilshell/oil/_tmp/spec-tmp/redirect.test.sh/nonexistent.txt: No such file
bash5 Redirect in assignment

stdout:
FILE=
FOO=
stderr:
foo
dash7 Bad redirects in function body

stdout:
status=2
stderr:
dash: 2: cannot create : Directory nonexistent
dash8 Redirect in function body is evaluated multiple times

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

stdout:
stderr: 
dash: 2: Syntax error: Bad fd number
bash13 Descriptor redirect with filename

stdout:
status=0
stderr:
mksh16 Prefix redirect for loop -- not allowed

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

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

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

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

stdout:
stderr: 
mksh: <stdin>[1]: 3>&3 : bad file descriptor
dash25 : 3>&3-

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

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

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

stdout:
stderr: 
dash: 1: 8: Bad file descriptor
dash35 >| to clobber

stdout:
status=2
XX
ZZ
stderr:
dash: 3: cannot create /home/andy/git/oilshell/oil/_tmp/spec-tmp/redirect.test.sh/c.txt: File exists
osh35 >| to clobber

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

stdout:
status=0
YY
ZZ
stderr:
osh_ALT35 >| to clobber

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

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

stdout:
STDOUT
stderr:
STDERR
dash38 1>&2- to move file descriptor

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

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

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

stdout:
stderr: 
mksh: <stdin>[4]: 8>&7- : illegal file descriptor name
dash42 &>> appends stdout and stderr

stdout:
stderr: 
dash45 $(< $file) yields the contents of the file

stdout:
stderr: 
dash49 2&>1 (is it a redirect or is it like a&>1)

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

stdout:
status=0
stderr:
bash50 can't mention big file descriptor

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

stdout:
hi
hi
hi 100
stderr:
osh_ALT50 can't mention big file descriptor

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

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

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

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

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

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

stdout:
stderr: