Results for command-sub.test.sh

statusoshosh_.pyosh_.cc
pass 26192
ok 110
BUG 111
FAIL 0725
total282828
caseoshosh_.pyosh_.ccdescription
0pass pass pass case
1pass pass FAIL case in subshell
details
2pass pass FAIL Command sub word part
details
3pass pass FAIL Backtick
details
4pass pass FAIL Backtick 2
details
5pass pass FAIL Nested backticks
details
6pass pass FAIL Making command out of command sub should work
details
7pass pass pass Making keyword out of command sub should NOT work
8pass FAIL FAIL Command sub with here doc
detailsdetails
9pass FAIL FAIL Here doc with pipeline
detailsdetails
10pass FAIL FAIL Command Sub word split
detailsdetails
11pass FAIL FAIL Command Sub trailing newline removed
detailsdetails
12pass FAIL FAIL Command Sub trailing whitespace not removed
detailsdetails
13pass pass FAIL Command Sub and exit code
details
14pass pass FAIL Command Sub in local sets exit code
details
15pass pass FAIL Double Quotes in Command Sub in Double Quotes
details
16pass FAIL FAIL Escaped quote in [[ ]]
detailsdetails
17pass pass FAIL Quoting $ within ``
details
18pass pass FAIL Quoting $ within `` within double quotes
details
19pass pass FAIL Quoting \ within ``
details
20pass pass FAIL Quoting \ within `` within double quotes
details
21pass pass FAIL Quoting ( within ``
details
22pass pass FAIL Quoting ( within `` within double quotes
details
23pass pass FAIL Quoting non-special characters within ``
details
24pass pass FAIL Quoting non-special characters within `` within double quotes
details
25ok ok FAIL Quoting double quotes within backticks
detailsdetailsdetails
26BUG BUG BUG More levels of double quotes in backticks
detailsdetailsdetails
27pass FAIL FAIL Syntax errors with double quotes within backticks
detailsdetails
47 passed, 2 OK, 0 not implemented, 3 BUG, 32 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc1 case in subshell

[osh_.cc stdout] Expected 'letter\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_.cc2 Command sub word part

[osh_.cc stdout] Expected 'FOObarFOO\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_.cc3 Backtick

[osh_.cc stdout] Expected 'FOObarFOO\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_.cc4 Backtick 2

[osh_.cc stdout] Expected 'ls\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_.cc5 Nested backticks

[osh_.cc stdout] Expected '000000-first\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_.cc6 Making command out of command sub should work

[osh_.cc stdout] Expected 'split builtin\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_.py8 Command sub with here doc

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

stdout:
stderr: 
  echo $(<<EOF tac
               ^~~
[ stdin ]:1: 'tac' not found
osh_.cc8 Command sub with here doc

[osh_.cc stdout] Expected 'two one\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_.py9 Here doc with pipeline

[osh_.py stdout] Expected u'twoXoneX', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  <<EOF tac | tr '\n' 'X'
              ^~
[ stdin ]:1: 'tr' not found
  <<EOF tac | tr '\n' 'X'
        ^~~
[ stdin ]:1: 'tac' not found
osh_.cc9 Here doc with pipeline

[osh_.cc stdout] Expected u'twoXoneX', 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_.py10 Command Sub word split

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

stdout:
stderr: 
  argv.py $(echo 'hi there') "$(echo 'hi there')"
  ^~~~~~~
[ stdin ]:1: 'argv.py' not found
osh_.cc10 Command Sub word split

[osh_.cc stdout] Expected "['hi', 'there', 'hi there']\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_.py11 Command Sub trailing newline removed

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

stdout:
stderr: 
  s=$(python -c 'print("ab\ncd\n")')
      ^~~~~~
[ stdin ]:1: 'python' not found
  argv.py "$s"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.cc11 Command Sub trailing newline removed

[osh_.cc stdout] Expected "['ab\\ncd']\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_.py12 Command Sub trailing whitespace not removed

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

stdout:
stderr: 
  s=$(python -c 'print("ab\ncd\n ")')
      ^~~~~~
[ stdin ]:1: 'python' not found
  argv.py "$s"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.cc12 Command Sub trailing whitespace not removed

[osh_.cc stdout] Expected "['ab\\ncd\\n ']\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_.cc13 Command Sub and exit code

[osh_.cc stdout] Expected 'x\n0\n33\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_.cc14 Command Sub in local sets exit code

[osh_.cc stdout] Expected 'x\n0\n0\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_.cc15 Double Quotes in Command Sub in Double Quotes

[osh_.cc stdout] Expected 'x hi\nx hi\nx "hi"\nx hi\nx hi\nx hi\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_.py16 Escaped quote in [[ ]]

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

stdout:
123  456
stderr:
  [[ $(echo \" > $file) ]]
               ^
[ backticks at ... ]:1: Can't open '/command-sub-dbracket': Permission denied
cat: /command-sub-dbracket: No such file or directory
osh_.cc16 Escaped quote in [[ ]]

[osh_.cc stdout] Expected '123 456\n"\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_.cc17 Quoting $ within ``

[osh_.cc stdout] Expected '1 $\n2 $\n3 $\n4 $\n5 \\$\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_.cc18 Quoting $ within `` within double quotes

[osh_.cc stdout] Expected '1 $\n2 $\n3 $\n4 $\n5 \\$\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_.cc19 Quoting \ within ``

[osh_.cc stdout] Expected '[1 ]\n[2 ]\n[3 \\]\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_.cc20 Quoting \ within `` within double quotes

[osh_.cc stdout] Expected '[1 ]\n[2 ]\n[3 \\]\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_.cc21 Quoting ( within ``

[osh_.cc stdout] Expected '1 (\n2 (\n3 (\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_.cc22 Quoting ( within `` within double quotes

[osh_.cc stdout] Expected '1 (\n2 (\n3 (\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_.cc23 Quoting non-special characters within ``

[osh_.cc stdout] Expected '[1 z]\n[2 z]\n[3 \\z]\n[4 \\z]\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_.cc24 Quoting non-special characters within `` within double quotes

[osh_.cc stdout] Expected '[1 z]\n[2 z]\n[3 \\z]\n[4 \\z]\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.
osh25 Quoting double quotes within backticks

stdout:
"foo"
foo
"foo"
stderr:
osh_.py25 Quoting double quotes within backticks

stdout:
"foo"
foo
"foo"
stderr:
osh_.cc25 Quoting double quotes within backticks

[osh_.cc stdout] Expected '"foo"\nfoo\n"foo"\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.
osh26 More levels of double quotes in backticks

stdout:
BUG
stderr:
osh_.py26 More levels of double quotes in backticks

stdout:
BUG
stderr:
osh_.cc26 More levels of double quotes in backticks

stdout:
BUG
stderr:
osh_.py27 Syntax errors with double quotes within backticks

[osh_.py stdout] Expected 'status=2\nstatus=2\n', got 'status=127\nstatus=127\n'

stdout:
status=127
status=127
stderr:
  $SH -c 'echo `echo "`'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo `echo \\\\"`'
      ^~
[ stdin ]:3: '-c' not found
osh_.cc27 Syntax errors with double quotes within backticks

[osh_.cc stdout] Expected 'status=2\nstatus=2\n', got 'status=127\nstatus=127\n'

stdout:
status=127
status=127
stderr:
  $SH -c 'echo `echo "`'
      ^~
[ stdin ]:1: '-c' not found
  $SH -c 'echo `echo \\\\"`'
      ^~
[ stdin ]:3: '-c' not found