Results for redirect.test.sh

casedashbashmkshoshosh_ALTosh-byterundescription
0pass pass pass pass pass FAIL >&
details
1pass pass pass pass pass FAIL <&
details
2pass pass pass pass pass FAIL Leading redirect
details
3ok pass pass pass pass FAIL Nonexistent file
detailsdetails
4pass pass pass pass pass FAIL Redirect in command sub
details
5ok ok ok pass pass FAIL Redirect in assignment is invalid
detailsdetailsdetailsdetails
6ok ok ok pass pass FAIL Redirect in assignment
detailsdetailsdetailsdetails
7pass pass pass pass pass FAIL Redirect in function body.
details
8N-I pass pass pass pass FAIL Redirect in function body is evaluated multiple times
detailsdetails
9pass pass pass pass pass FAIL Redirect in function body AND function call
details
10pass pass pass pass pass FAIL Descriptor redirect with spaces
details
11pass pass pass pass pass FAIL Filename redirect with spaces
details
12pass pass pass pass pass FAIL Quoted filename redirect with spaces
details
13ok BUG pass pass pass FAIL Descriptor redirect with filename
detailsdetailsdetails
14pass pass pass pass pass FAIL redirect for loop
details
15pass pass pass pass pass FAIL redirect subshell
details
16pass pass ok pass pass FAIL Prefix redirect for loop -- not allowed
detailsdetails
17pass pass pass pass pass FAIL Brace group redirect
details
18pass pass pass pass pass FAIL Redirect echo to stderr, and then redirect all of stdout somewhere.
details
19pass pass pass pass pass FAIL Redirect in the middle of two assignments
details
20pass pass pass pass pass FAIL Redirect in the middle of a command
details
21N-I pass N-I FAIL FAIL FAIL Named file descriptor
detailsdetailsdetailsdetailsdetails
22pass pass pass pass pass FAIL Redirect function stdout
details
23pass pass pass pass pass FAIL Nested function stdout redirect
details
24ok pass pass pass pass FAIL Redirect to empty string
detailsdetails
25ok pass pass pass pass pass Redirect to file descriptor that's not open
details
26pass pass pass pass pass FAIL Open descriptor with exec
details
27pass pass pass pass pass FAIL Open multiple descriptors with exec
details
28ok pass pass FAIL FAIL FAIL >| to clobber
detailsdetailsdetailsdetails
29N-I pass pass pass pass FAIL &> redirects stdout and stderr
detailsdetails
30N-I pass N-I FAIL FAIL FAIL 1>&2- to close file descriptor
detailsdetailsdetailsdetailsdetails
31pass pass pass FAIL FAIL FAIL <> for read/write
detailsdetailsdetails
32N-I pass pass pass pass FAIL &>> appends stdout and stderr
detailsdetails

138 passed, 12 ok, 7 known unimplemented, 1 known bugs, 4 failed, 0 skipped

Details on runs that didn't PASS

osh-byterun0 >&

[osh-byterun stderr] Expected 'hi\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun1 <&

[osh-byterun stdout] Expected '[foo]\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun2 Leading redirect

[osh-byterun stdout] Expected 'hello\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash3 Nonexistent file

stdout:
status=2
stderr:
_tmp/spec-bin/dash: 1: cannot open /home/andy/git/oilshell/oil/_tmp/spec-tmp/redirect.test.sh/nonexistent.txt: No such file
osh-byterun3 Nonexistent file

[osh-byterun stdout] Expected 'status=1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun4 Redirect in command sub

[osh-byterun stdout] Expected '\n', got ''
[osh-byterun stderr] Expected 'foo\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash5 Redirect in assignment is invalid

stdout:
stderr: 
bash5 Redirect in assignment is invalid

stdout:
stderr: 
mksh5 Redirect in assignment is invalid

stdout:
stderr: 
osh-byterun5 Redirect in assignment is invalid

[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash6 Redirect in assignment

stdout:
FILE=
foo
FOO=
stderr:
bash6 Redirect in assignment

stdout:
FILE=
FOO=
stderr:
foo
mksh6 Redirect in assignment

stdout:
FILE=
foo
FOO=
stderr:
osh-byterun6 Redirect in assignment

[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun7 Redirect in function body.

[osh-byterun stderr] Expected u'hi\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash8 Redirect in function body is evaluated multiple times

stdout:
stderr: 
_tmp/spec-bin/dash: 2: arithmetic expression: expecting primary: "i++"
osh-byterun8 Redirect in function body is evaluated multiple times

[osh-byterun stdout] Expected u'i=2\n__\nfile 1\n__\nfile 2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun9 Redirect in function body AND function call

[osh-byterun stdout] Expected u'hi\n', got ''
[osh-byterun stderr] Expected u'', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun10 Descriptor redirect with spaces

[osh-byterun stderr] Expected u'one\ntwo 1\nthree\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun11 Filename redirect with spaces

[osh-byterun stdout] Expected 'two\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun12 Quoted filename redirect with spaces

[osh-byterun stdout] Expected 'two 1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash13 Descriptor redirect with filename

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Syntax error: Bad fd number
bash13 Descriptor redirect with filename

stdout:
status=0
stderr:
osh-byterun13 Descriptor redirect with filename

[osh-byterun stdout] Expected 'status=1\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun14 redirect for loop

[osh-byterun stdout] Expected u'1\n2\n3\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun15 redirect subshell

[osh-byterun stderr] Expected 'foo\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
mksh16 Prefix redirect for loop -- not allowed

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: for: not found
_tmp/spec-bin/mksh: <stdin>[2]: syntax error: 'do' unexpected
osh-byterun16 Prefix redirect for loop -- not allowed

[osh-byterun status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun17 Brace group redirect

[osh-byterun stdout] Expected '15\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun18 Redirect echo to stderr, and then redirect all of stdout somewhere.

[osh-byterun stdout] Expected '10\n', got ''
[osh-byterun stderr] Expected 'foo\n', got 'Traceback (most recent call last):\n File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>\n from frontend import args\nImportError: No module named frontend\n'
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun19 Redirect in the middle of two assignments

[osh-byterun stdout] Expected u'bar\nfoo\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun20 Redirect in the middle of a command

[osh-byterun stdout] Expected u'1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 ', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash21 Named file descriptor

stdout:
stderr: 
_tmp/spec-bin/dash: 1: exec: {myfd}: not found
mksh21 Named file descriptor

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: {myfd}: not found
osh21 Named file descriptor

[osh stdout] Expected 'named-fd-contents\n', got ''
[osh status] Expected 0, got 127

stdout:
stderr: 
osh error: '{myfd}': No such file or directory
osh_ALT21 Named file descriptor

[osh_ALT stdout] Expected 'named-fd-contents\n', got ''
[osh_ALT status] Expected 0, got 127

stdout:
stderr: 
osh error: '{myfd}': No such file or directory
osh-byterun21 Named file descriptor

[osh-byterun stdout] Expected 'named-fd-contents\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun22 Redirect function stdout

[osh-byterun stdout] Expected u'one\ntwo\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun23 Nested function stdout redirect

[osh-byterun stdout] Expected u'i1\ni2\n--\no1\no2\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash24 Redirect to empty string

stdout:
result=2
stderr:
_tmp/spec-bin/dash: 2: cannot create : Directory nonexistent
_tmp/spec-bin/dash: 5: cannot create : Directory nonexistent
osh-byterun24 Redirect to empty string

[osh-byterun stdout] Expected 'result=1\n', got ''

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash25 Redirect to file descriptor that's not open

stdout:
stderr: 
_tmp/spec-bin/dash: 1: 9: Bad file descriptor
osh-byterun26 Open descriptor with exec

[osh-byterun stdout] Expected 'hi\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh-byterun27 Open multiple descriptors with exec

[osh-byterun stdout] Expected u'three\nfour\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash28 >| to clobber

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

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

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

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

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

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

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash29 &> redirects stdout and stderr

stdout:
STDOUT
stderr:
STDERR
osh-byterun29 &> redirects stdout and stderr

[osh-byterun stdout] Expected 'ok\nok\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash30 1>&2- to close file descriptor

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Syntax error: Bad fd number
mksh30 1>&2- to close file descriptor

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[1]: >&2- : illegal file descriptor name
osh30 1>&2- to close file descriptor

[osh status] Expected 0, got 1

stdout:
stderr: 
osh error: Redirect descriptor should look like an integer, got (value.Str s:2-)
osh_ALT30 1>&2- to close file descriptor

[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
osh error: Redirect descriptor should look like an integer, got (value.Str s:2-)
osh-byterun30 1>&2- to close file descriptor

[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
osh31 <> for read/write

[osh stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 783, in <module>
    main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 752, in main
    sys.exit(AppBundleMain(argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 726, in AppBundleMain
    status = ShellMain('osh', argv0, main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 558, in ShellMain
    status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 162, in Batch
    is_control_flow, is_fatal = ex.ExecuteAndCatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1236, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1174, in _Execute
    if self.fd_state.Push(redirects, self.waiter):
  File "/home/andy/git/oilshell/oil/core/process.py", line 275, in Push
    if not self._ApplyRedirect(r, waiter):
  File "/home/andy/git/oilshell/oil/core/process.py", line 178, in _ApplyRedirect
    raise NotImplementedError(r.op_id)
NotImplementedError: <Id_t Redir_LessGreat 62>
osh_ALT31 <> for read/write

[osh_ALT stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 770, in _cpython_main_hook
    main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 752, in main
    sys.exit(AppBundleMain(argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 745, in AppBundleMain
    return readlink.main(main_argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 558, in ShellMain
    status = main_loop.Batch(ex, c_parser, arena, nodes_out=nodes_out)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 169, in Batch
    return ex.LastStatus()
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1236, in ExecuteAndCatch
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/osh/cmd_exec.py", line 1174, in _Execute
    if self.fd_state.Push(redirects, self.waiter):
  File "/home/andy/git/oilshell/oil/core/process.py", line 275, in Push
    if not self._ApplyRedirect(r, waiter):
  File "/home/andy/git/oilshell/oil/core/process.py", line 219, in _ApplyRedirect
    ok = False
NotImplementedError: <Id_t Redir_LessGreat 62>
FATAL: couldn't import from app bundle '_tmp/oil-tar-test/oil-0.6.pre17/_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh-byterun31 <> for read/write

[osh-byterun stdout] Expected u'line=first\nCONTENTS\nfirst\nsecond\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend
dash32 &>> appends stdout and stderr

stdout:
stderr: 
osh-byterun32 &>> appends stdout and stderr

[osh-byterun stdout] Expected 'ok\nok\nok\n', got ''
[osh-byterun status] Expected 0, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/opy_.py", line 10, in <module>
    from frontend import args
ImportError: No module named frontend