Results for sh-usage.test.sh

statusoshosh_.pyosh_.cc
pass 1133
FAIL 088
total111111
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL sh -c
detailsdetails
1pass FAIL FAIL empty -c input
detailsdetails
2pass FAIL FAIL sh +c is accepted
detailsdetails
3pass pass pass empty stdin
4pass FAIL FAIL shell obeys --help (regression for OSH)
detailsdetails
5pass FAIL FAIL args are passed
detailsdetails
6pass FAIL FAIL args that look like flags are passed after script
detailsdetails
7pass FAIL FAIL args that look like flags are passed after -c
detailsdetails
8pass pass pass exit with explicit arg
9pass pass pass exit with no args
10pass FAIL FAIL --rcfile in non-interactive shell prints warnings
detailsdetails
17 passed, 0 OK, 0 not implemented, 0 BUG, 16 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_.py2 sh +c is accepted

[osh_.py stdout] Expected 'hi\n', got "(cmd_value.Argv argv:['+c' 'echo hi'] arg_spids:[2 5])\n"

stdout:
(cmd_value.Argv argv:['+c' 'echo hi'] arg_spids:[2 5])
stderr:
Unhandled SimpleCommand
osh_.cc2 sh +c is accepted

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

stdout:
(cmd_value.Argv argv:['+c' 'echo hi'] arg_spids:[2 5])
stderr:
Unhandled SimpleCommand
osh_.py4 shell obeys --help (regression for OSH)

[osh_.py stdout] Expected 'yes\n', got ''

stdout:
stderr: 
  if test $n -gt 0; then
             ^~~
[ stdin ]:2: (test) Expected unary operator, got '-gt' (2 args)
osh_.cc4 shell obeys --help (regression for OSH)

[osh_.cc stdout] Expected 'yes\n', got ''

stdout:
stderr: 
  if test $n -gt 0; then
             ^~~
[ stdin ]:2: (test) Expected unary operator, got '-gt' (2 args)
osh_.py5 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_.cc5 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_.py6 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_.cc6 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_.py7 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_.cc7 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_.py10 --rcfile in non-interactive shell prints warnings

[osh_.py stderr] Expected 'warned=1\nwarned=0\n', got 'Unhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\n'

stdout:
echo rc
(cmd_value.Argv argv:[--rcfile rc -i] arg_spids:[12 14 16])
(cmd_value.Argv argv:[grep -q warning interactive.txt] arg_spids:[24 26 28 32])
warned=0
(cmd_value.Argv argv:[--rcfile rc] arg_spids:[44 46])
(cmd_value.Argv argv:[grep -q warning non-interactive.txt] arg_spids:[54 56 58 62])
warned=0
(cmd_value.Argv argv:[head interactive.txt non-interactive.txt] arg_spids:[72 74 74])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc10 --rcfile in non-interactive shell prints warnings

[osh_.cc stderr] Expected 'warned=1\nwarned=0\n', got 'Unhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\nUnhandled SimpleCommand\n'

stdout:
echo rc
(cmd_value.Argv argv:[--rcfile rc -i] arg_spids:[12 14 16])
(cmd_value.Argv argv:[grep -q warning interactive.txt] arg_spids:[24 26 28 32])
warned=0
(cmd_value.Argv argv:[--rcfile rc] arg_spids:[44 46])
(cmd_value.Argv argv:[grep -q warning non-interactive.txt] arg_spids:[54 56 58 62])
warned=0
(cmd_value.Argv argv:[head interactive.txt non-interactive.txt] arg_spids:[72 74 74])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand