Results for redirect.test.sh

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

Details on runs that didn't PASS

osh22 >| to clobber

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

stdout:
status=0
YY
ZZ
stderr:
osh-cpp22 >| to clobber

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

stdout:
status=0
YY
ZZ
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-18615.txt'.  Expected D, -, or D- where D is an integer
grep: osh-18615.txt: No such file or directory
grep: osh-18615.txt: No such file or directory
osh-cpp24 >&word redirects stdout and stderr when word is not a number or -

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

stdout:
stderr: 
  stdout_stderr.py >&$tmp
                     ^~~~
[ stdin ]:5: Invalid descriptor 'osh-18630.txt'.  Expected D, -, or D- where D is an integer
grep: osh-18630.txt: No such file or directory
grep: osh-18630.txt: No such file or directory
osh32 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr:
osh-cpp32 can't mention big file descriptor

stdout:
hi
hi
hi 100
stderr: