spec test index / oilshell.org
184 passed, 14 OK, 12 not implemented, 5 BUG, 5 failed, 0 timeouts, 0 cases skipped 2 failed under osh
dash | 3 Nonexistent file stdout: status=2stderr: dash: 1: cannot open /home/travis/build/oilshell/oil/_tmp/spec-tmp/redirect.test.sh/nonexistent.txt: No such file |
bash | 5 Redirect in assignment stdout: FILE= FOO=stderr: foo |
dash | 7 Bad redirects in function body stdout: status=2stderr: dash: 2: cannot create : Directory nonexistent |
dash | 8 Redirect in function body is evaluated multiple times stdout: stderr: dash: 2: arithmetic expression: expecting primary: "i++" |
dash | 13 Descriptor redirect with filename stdout: stderr: dash: 2: Syntax error: Bad fd number |
bash | 13 Descriptor redirect with filename stdout: status=0stderr: |
mksh | 16 Prefix redirect for loop -- not allowed stdout: stderr: mksh: <stdin>[1]: for: not found mksh: <stdin>[2]: syntax error: 'do' unexpected |
dash | 21 Named file descriptor stdout: stderr: dash: 1: exec: {myfd}: not found |
mksh | 21 Named file descriptor stdout: stderr: mksh: <stdin>[1]: {myfd}: not found |
dash | 22 Double digit fd (20> file) stdout: stderr: dash: 1: exec: 20: not found |
mksh | 24 : 3>&3 (OSH regression) stdout: stderr: |
dash | 25 : 3>&3- stdout: stderr: dash: 2: Syntax error: Bad fd number |
mksh | 25 : 3>&3- stdout: stderr: mksh: <stdin>[1]: 3>&3- : illegal file descriptor name |
dash | 31 Redirect to empty string stdout: result=2stderr: dash: 2: cannot create : Directory nonexistent dash: 5: cannot create : Directory nonexistent |
dash | 32 Redirect to file descriptor that's not open stdout: stderr: dash: 7: 7: Bad file descriptor |
dash | 35 >| to clobber stdout: status=2 XX ZZstderr: dash: 3: cannot create /home/travis/build/oilshell/oil/_tmp/spec-tmp/redirect.test.sh/c.txt: File exists |
osh | 35 >| to clobber [osh stdout] Expected 'status=1\nXX\nZZ\n', got 'status=0\nYY\nZZ\n' stdout: status=0 YY ZZstderr: |
dash | 36 &> redirects stdout and stderr stdout: STDOUTstderr: STDERR |
dash | 38 1>&2- to move file descriptor stdout: stderr: dash: 4: Syntax error: Bad fd number |
mksh | 38 1>&2- to move file descriptor stdout: stderr: mksh: <stdin>[3]: 6>&5- : illegal file descriptor name |
dash | 39 1>&2- (Bash bug: fail to restore closed fd) [dash stdout] Expected u'', got "6\nFD 6 shouldn't be open\nOPENED:\n0\n1\n10\n11\n12\n13\n2\n3\n4\n5\n6\n9\n" stdout: 6 FD 6 shouldn't be open OPENED: 0 1 10 11 12 13 2 3 4 5 6 9stderr: dash: 16: Syntax error: Bad fd number |
bash | 39 1>&2- (Bash bug: fail to restore closed fd) [bash stdout] Expected 'hello\n', got "6\nFD 6 shouldn't be open\nOPENED:\n0\n1\n10\n11\n12\n13\n2\n3\n4\n5\n6\n9\nhello\nworld\n" stdout: 6 FD 6 shouldn't be open OPENED: 0 1 10 11 12 13 2 3 4 5 6 9 hello worldstderr: |
mksh | 39 1>&2- (Bash bug: fail to restore closed fd) [mksh stdout] Expected u'', got "6\nFD 6 shouldn't be open\nOPENED:\n0\n1\n10\n11\n12\n13\n2\n24\n25\n3\n4\n6\n9\n" stdout: 6 FD 6 shouldn't be open OPENED: 0 1 10 11 12 13 2 24 25 3 4 6 9stderr: mksh: <stdin>[15]: 6>&7- : illegal file descriptor name |
osh | 39 1>&2- (Bash bug: fail to restore closed fd) [osh stdout] Expected u'', got "6\nFD 6 shouldn't be open\nOPENED:\n0\n1\n10\n11\n12\n13\n2\n3\n4\n5\n6\n9\nhello\n" [osh status] Expected 2, got 0 stdout: 6 FD 6 shouldn't be open OPENED: 0 1 10 11 12 13 2 3 4 5 6 9 hellostderr: echo world >&7 ^~ [ stdin ]:16: 7: Bad file descriptor |
dash | 42 &>> appends stdout and stderr stdout: stderr: |
dash | 45 $(< $file) yields the contents of the file stdout: stderr: |
dash | 49 2&>1 (is it a redirect or is it like a&>1) stdout: status=0stderr: dash: 1: 2: not found |
mksh | 49 2&>1 (is it a redirect or is it like a&>1) stdout: status=0stderr: |
bash | 50 can't mention big file descriptor stdout: hi hi histderr: |
osh | 50 can't mention big file descriptor stdout: hi hi hi 100stderr: |
dash | 51 : >/dev/null 2> / (OSH regression: fail to pop fd frame) stdout: stderr: dash: 1: cannot create /: Is a directory |
mksh | 51 : >/dev/null 2> / (OSH regression: fail to pop fd frame) stdout: stderr: mksh: <stdin>[1]: can't create /: Is a directory |
dash | 52 echo foo >&100 (OSH regression: does not fail with invalid fd 100) stdout: stderr: dash: 3: Syntax error: Bad fd number |
dash | 53 echo foo >&N where N is first unused fd stdout: stderr: dash: 7: Syntax error: Bad function name |
dash | 54 exec {fd}>&- (OSH regression: fails to close fd) stdout: stderr: |
mksh | 54 exec {fd}>&- (OSH regression: fails to close fd) stdout: stderr: |