case | dash | bash | mksh | osh | description |
0 | pass | pass | pass | FAIL | Leading redirect |
details | |||||
1 | pass | pass | pass | pass | No command |
2 | pass | pass | pass | FAIL | Redirect in subshell |
details | |||||
3 | ok | pass | ok | FAIL | Redirect in assignment |
details | details | details | |||
4 | pass | pass | pass | FAIL | Redirect in function body. |
details | |||||
5 | pass | pass | pass | pass | Descriptor redirect with spaces |
6 | pass | pass | pass | pass | Filename redirect with spaces |
7 | pass | pass | pass | pass | Quoted filename redirect with spaces |
8 | pass | BUG | ok | FAIL | Descriptor redirect with filename |
details | details | details | |||
9 | pass | pass | pass | FAIL | redirect for loop |
details | |||||
10 | pass | pass | ok | FAIL | Prefix redirect for loop -- not allowed |
details | details | ||||
11 | pass | pass | pass | FAIL | Block redirect |
details | |||||
12 | pass | pass | pass | FAIL | Redirect echo to stderr, and then redirect all of stdout somewhere. |
details | |||||
13 | pass | pass | pass | pass | Redirect in the middle of two assignments |
14 | pass | pass | pass | FAIL | Redirect in the middle of a command |
details | |||||
15 | N-I | pass | N-I | FAIL | Named file descriptor |
details | details | details |
46 passed, 4 ok, 2 known unimplemented, 1 known bugs, 11 failed, 0 skipped
osh | 0 Leading redirect [osh stdout] Expected b'hello\n', got b'' stdout: stderr: |
osh | 2 Redirect in subshell [osh stdout] Expected b'\n', got b'foo\n' [osh stderr] Expected b'foo\n', got b'' stdout: foostderr: |
dash | 3 Redirect in assignment stdout: FILE= foo FOO=stderr: |
mksh | 3 Redirect in assignment stdout: FILE= foo FOO=stderr: |
osh | 3 Redirect in assignment [osh stdout] Expected b'FILE=\nFOO=\n', got b'WARNING: Got redirects in assignment: %s [(Redirect\n op_id: Redir_Great\n arg_word: \n (CompoundWord\n parts: [\n (SimpleVarSub token:(token id:VSub_Name val:"$TMP" span_id:11))\n (LiteralPart token:(token id:Lit_Chars val:/no-command.txt span_id:12))\n ]\n )\n fd: 2\n spids: [10]\n)]\nFILE=\nfoo\nFOO=WARNING: Got redirects in assignment: %s [(Redirect\n op_id: Redir_Great\n arg_word: \n (CompoundWord\n parts: [\n (SimpleVarSub token:(token id:VSub_Name val:"$TMP" span_id:11))\n (LiteralPart token:(token id:Lit_Chars val:/no-command.txt span_id:12))\n ]\n )\n fd: 2\n spids: [10]\n)]\nfoo\n' stdout: WARNING: Got redirects in assignment: %s [(Redirect op_id: Redir_Great arg_word: (CompoundWord parts: [ (SimpleVarSub token:(token id:VSub_Name val:"$TMP" span_id:11)) (LiteralPart token:(token id:Lit_Chars val:/no-command.txt span_id:12)) ] ) fd: 2 spids: [10] )] FILE= foo FOO=WARNING: Got redirects in assignment: %s [(Redirect op_id: Redir_Great arg_word: (CompoundWord parts: [ (SimpleVarSub token:(token id:VSub_Name val:"$TMP" span_id:11)) (LiteralPart token:(token id:Lit_Chars val:/no-command.txt span_id:12)) ] ) fd: 2 spids: [10] )] foostderr: FOO=WARNING: Got redirects in assignment: %s [(Redirect op_id: Redir_Great arg_word: (CompoundWord parts: [ (SimpleVarSub token:(token id:VSub_Name val:"$TMP" span_id:11)) (LiteralPart token:(token id:Lit_Chars val:: No such file or directory |
osh | 4 Redirect in function body. [osh stderr] Expected b'hi\n', got b'' stdout: histderr: |
bash | 8 Descriptor redirect with filename stdout: stderr: |
mksh | 8 Descriptor redirect with filename stdout: stderr: /bin/mksh: <stdin>[1]: >&/home/andy/git/oil/_tmp/spec-tmp/nonexistent-filename__ : illegal file descriptor name |
osh | 8 Descriptor redirect with filename [osh status] Expected 2, got 1 stdout: stderr: Traceback (most recent call last): File "bin/osh", line 378, in <module> sys.exit(main(sys.argv)) File "bin/osh", line 368, in main return OshMain(main_argv) File "bin/osh", line 327, in OshMain status = ex.Execute(node) File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 900, in Execute status = self._Execute(node) File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 704, in _Execute for r in redirects: TypeError: 'bool' object is not iterable |
osh | 9 redirect for loop [osh stdout] Expected b'1\n2\n3\n', got b'1\n2\n3\n1\n2\n3\n' stdout: 1 2 3 1 2 3stderr: |
mksh | 10 Prefix redirect for loop -- not allowed stdout: stderr: /bin/mksh: <stdin>[1]: for: not found /bin/mksh: <stdin>[2]: syntax error: 'do' unexpected |
osh | 10 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: b'/home/andy/bin/for' |
osh | 11 Block redirect [osh stdout] Expected b'15\n', got b'block-redirect\n15\n' stdout: block-redirect 15stderr: |
osh | 12 Redirect echo to stderr, and then redirect all of stdout somewhere. [osh stdout] Expected b'10\n', got b'012345789\n10\n' stdout: 012345789 10stderr: foo |
osh | 14 Redirect in the middle of a command [osh stdout] Expected b'1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 ', got b'' stdout: stderr: Traceback (most recent call last): File "bin/osh", line 378, in <module> sys.exit(main(sys.argv)) File "bin/osh", line 368, in main return OshMain(main_argv) File "bin/osh", line 327, in OshMain status = ex.Execute(node) File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 900, in Execute status = self._Execute(node) File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 791, in _Execute status = self._Execute(child) # last status wins File "/home/andy/git/oil/bin/../core/cmd_exec.py", line 715, in _Execute self.fd_state.RestoreAll() File "/home/andy/git/oil/bin/../core/process.py", line 73, in RestoreAll os.close(fd) OSError: [Errno 9] Bad file descriptor |
dash | 15 Named file descriptor stdout: stderr: /bin/dash: 1: exec: {myfd}: not found |
mksh | 15 Named file descriptor stdout: stderr: /bin/mksh: <stdin>[1]: {myfd}: not found |
osh | 15 Named file descriptor [osh stdout] Expected b'named-fd-contents\n', got b'' stdout: stderr: Unexpected error in execvpe('{myfd}', ['{myfd}'], ...): [Errno 2] No such file or directory: b'/home/andy/bin/{myfd}' |