Results for sh-usage.test.sh

statusoshosh_.pyosh_.cc
pass 811
FAIL 077
total888
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL sh -c
detailsdetails
1pass FAIL FAIL empty -c input
detailsdetails
2pass pass pass empty stdin
3pass FAIL FAIL args are passed
detailsdetails
4pass FAIL FAIL args that look like flags are passed after script
detailsdetails
5pass FAIL FAIL args that look like flags are passed after -c
detailsdetails
6pass FAIL FAIL exit with explicit arg
detailsdetails
7pass FAIL FAIL exit with no args
detailsdetails
10 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 "(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_.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 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_.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 args are passed

[osh_.py 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_.cc3 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_.py4 args that look like flags are passed after script

[osh_.py 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_.cc4 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_.py5 args that look like flags are passed after -c

[osh_.py 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_.cc5 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_.py6 exit with explicit arg

[osh_.py status] Expected 42, 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 341, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main
    status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 938, in _Dispatch
    raise util.UserExit(arg)  # handled differently than other control flow
core.util.UserExit
osh_.cc6 exit with explicit arg

[osh_.cc status] Expected 42, got -6

stdout:
stderr: 
terminate called after throwing an instance of 'util::UserExit*'
osh_.py7 exit with no args

[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 341, in <module>
    status = main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 228, in main
    status = main_loop.Batch(cmd_ev, c_parser, arena, is_main=True)
  File "/home/andy/git/oilshell/oil/core/main_loop.py", line 165, in Batch
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, optimize=optimize)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1450, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1334, in _Execute
    status, check_errexit = self._Dispatch(node)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 573, in _Dispatch
    status = self._RunSimpleCommand(cmd_val, node.do_fork)
  File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand
    return self.shell_ex.RunSimpleCommand(cmd_val, do_fork)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 321, in RunSimpleCommand
    return self.RunBuiltin(builtin_id, cmd_val)
  File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 302, in RunBuiltin
    builtin_func = self.builtins[builtin_id]
KeyError: 19
osh_.cc7 exit with no args

[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: mycpp/mylib.h:578: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed.