Results for sh-usage.test.sh

statusoshosh_.pyosh_.cc
pass 922
FAIL 077
total999
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL sh -c
detailsdetails
1pass FAIL FAIL empty -c input
detailsdetails
2pass pass pass empty stdin
3pass FAIL FAIL shell obeys --help (regression for OSH)
detailsdetails
4pass FAIL FAIL args are passed
detailsdetails
5pass FAIL FAIL args that look like flags are passed after script
detailsdetails
6pass FAIL FAIL args that look like flags are passed after -c
detailsdetails
7pass FAIL FAIL exit with explicit arg
detailsdetails
8pass pass pass exit with no args
13 passed, 0 OK, 0 not implemented, 0 BUG, 14 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.py0 sh -c

[osh_.py stdout] Expected 'hi\n', got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
Error running ['-c', 'echo hi']: [Errno 2] No such file or directory
osh_.cc0 sh -c

[osh_.cc stdout] Expected 'hi\n', got "(cmd_value.Argv argv:[-c 'echo hi'] arg_spids:[2 4])\n"

stdout:
(cmd_value.Argv argv:[-c 'echo hi'] arg_spids:[2 4])
stderr:
Unhandled SimpleCommand
osh_.py1 empty -c input

[osh_.py status] Expected 0, got 1

stdout:
stderr: 
Error running ['-c', '']: [Errno 2] No such file or directory
osh_.cc1 empty -c input

[osh_.cc stdout] Expected u'', got "(cmd_value.Argv argv:[-c ''] arg_spids:[2 4])\n"

stdout:
(cmd_value.Argv argv:[-c ''] arg_spids:[2 4])
stderr:
Unhandled SimpleCommand
osh_.py3 shell obeys --help (regression for OSH)

[osh_.py stdout] Expected 'yes\n', got ''
[osh_.py status] Expected 0, got 1
[osh_.py stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 837, in _Dispatch
    val = self.word_ev.EvalRhsWord(pair.rhs)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1602, in EvalRhsWord
    return self.EvalWordToString(w)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1498, in EvalWordToString
    self._EvalWordPart(p, part_vals, quoted=False)
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart
    sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t
  File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub
    stdout = self.shell_ex.RunCommandSub(node)
AttributeError: 'NoneType' object has no attribute 'RunCommandSub'
osh_.cc3 shell obeys --help (regression for OSH)

[osh_.cc stdout] Expected 'yes\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.py4 args are passed

[osh_.py stdout] Expected "['a', 'b']\n", got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
Error running ['-c', 'argv.py "$@"', 'dummy', 'a', 'b']: [Errno 2] No such file or directory
osh_.cc4 args are passed

[osh_.cc stdout] Expected "['a', 'b']\n", got '(cmd_value.Argv argv:[-c \'argv.py "$@"\' dummy a b] arg_spids:[2 4 8 10 12])\n'

stdout:
(cmd_value.Argv argv:[-c 'argv.py "$@"' dummy a b] arg_spids:[2 4 8 10 12])
stderr:
Unhandled SimpleCommand
osh_.py5 args that look like flags are passed after script

[osh_.py stdout] Expected "['--help', '--help', '-h']\n", got 'argv.py "$@"\n'
[osh_.py status] Expected 0, got 1

stdout:
argv.py "$@"
stderr:
chmod: cannot access '/sh1.sh': No such file or directory
Error running ['/sh1.sh', '--help', '--help', '-h']: [Errno 2] No such file or directory
osh_.cc5 args that look like flags are passed after script

[osh_.cc stdout] Expected "['--help', '--help', '-h']\n", got 'argv.py "$@"\n(cmd_value.Argv argv:[chmod \'+x\' \'/sh1.sh\'] arg_spids:[14 16 19])\n(cmd_value.Argv argv:[\'/sh1.sh\' --help --help -h] arg_spids:[23 25 27 29])\n'

stdout:
argv.py "$@"
(cmd_value.Argv argv:[chmod '+x' '/sh1.sh'] arg_spids:[14 16 19])
(cmd_value.Argv argv:['/sh1.sh' --help --help -h] arg_spids:[23 25 27 29])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.py6 args that look like flags are passed after -c

[osh_.py stdout] Expected "['--help', '-h']\n", got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
Error running ['-c', 'argv.py "$@"', '--help', '--help', '-h']: [Errno 2] No such file or directory
osh_.cc6 args that look like flags are passed after -c

[osh_.cc stdout] Expected "['--help', '-h']\n", got '(cmd_value.Argv argv:[-c \'argv.py "$@"\' --help --help -h] arg_spids:[2 4 8 10 12])\n'

stdout:
(cmd_value.Argv argv:[-c 'argv.py "$@"' --help --help -h] arg_spids:[2 4 8 10 12])
stderr:
Unhandled SimpleCommand
osh_.py7 exit with explicit arg

[osh_.py status] Expected 42, got 1

stdout:
stderr: 
osh_.cc7 exit with explicit arg

[osh_.cc status] Expected 42, got 1

stdout:
stderr: