Results for sh-usage.test.sh

statusoshosh_.pyosh_.cc
pass 1132
FAIL 089
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 FAIL empty stdin
details
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
16 passed, 0 OK, 0 not implemented, 0 BUG, 17 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 127

stdout:
stderr: 
  $SH -c 'echo hi'
      ^~
[ stdin ]:1: '-c' not found
osh_.cc0 sh -c

[osh_.cc stdout] Expected 'hi\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  $SH -c 'echo hi'
      ^~
[ stdin ]:1: '-c' not found
osh_.py1 empty -c input

[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  $SH -c ''
      ^~
[ stdin ]:1: '-c' not found
osh_.cc1 empty -c input

[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  $SH -c ''
      ^~
[ stdin ]:1: '-c' not found
osh_.py2 sh +c is accepted

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

stdout:
stderr: 
  $SH +c 'echo hi'
      ^
[ stdin ]:1: '+c' not found
osh_.cc2 sh +c is accepted

[osh_.cc stdout] Expected 'hi\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  $SH +c 'echo hi'
      ^
[ stdin ]:1: '+c' not found
osh_.cc3 empty stdin

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py4 shell obeys --help (regression for OSH)

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

stdout:
stderr: 
  n=$($SH --help | wc -l)
                   ^~
[ stdin ]:1: 'wc' not found
  n=$($SH --help | wc -l)
          ^~~~~~
[ stdin ]:1: '--help' not found
  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 ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.py5 args are passed

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

stdout:
stderr: 
  $SH -c 'argv.py "$@"' dummy a b
      ^~
[ stdin ]:1: '-c' not found
osh_.cc5 args are passed

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

stdout:
stderr: 
  $SH -c 'argv.py "$@"' dummy a b
      ^~
[ stdin ]:1: '-c' not found
osh_.py6 args that look like flags are passed after script

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

stdout:
stderr: 
  echo 'argv.py "$@"' > $script
                      ^
[ stdin ]:2: Can't open '/sh1.sh': Permission denied
chmod: cannot access '/sh1.sh': No such file or directory
  $SH $script --help --help -h
      ^~~~~~~
[ stdin ]:4: '/sh1.sh' not found
osh_.cc6 args that look like flags are passed after script

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

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.
osh_.py7 args that look like flags are passed after -c

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

stdout:
stderr: 
  $SH -c 'argv.py "$@"' --help --help -h
      ^~
[ stdin ]:1: '-c' not found
osh_.cc7 args that look like flags are passed after -c

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

stdout:
stderr: 
  $SH -c 'argv.py "$@"' --help --help -h
      ^~
[ stdin ]:1: '-c' not found
osh_.py10 --rcfile in non-interactive shell prints warnings

[osh_.py stderr] Expected 'warned=1\nwarned=0\n', got "warned=1\nwarned=1\n head *interactive.txt\n ^~~~\n[ stdin ]:8: 'head' not found\n"
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
warned=1
warned=1
  head *interactive.txt
  ^~~~
[ stdin ]:8: 'head' not found
osh_.cc10 --rcfile in non-interactive shell prints warnings

[osh_.cc stderr] Expected 'warned=1\nwarned=0\n', got "osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.\n"
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.