Results for command-sub.test.sh

statusoshosh-cpp
pass 3019
FAIL 011
total3030
caseoshosh-cppdescription
0pass pass case
1pass FAIL case in subshell
details
2pass FAIL Command sub word part
details
3pass pass Backtick
4pass pass Backtick 2
5pass pass Nested backticks
6pass FAIL Making command out of command sub should work
details
7pass pass Making keyword out of command sub should NOT work
8pass FAIL Command sub with here doc
details
9pass pass Here doc with pipeline
10pass FAIL Command Sub word split
details
11pass FAIL Command Sub trailing newline removed
details
12pass FAIL Command Sub trailing whitespace not removed
details
13pass FAIL Command Sub and exit code
details
14pass FAIL Command Sub in local sets exit code
details
15pass FAIL Double Quotes in Command Sub in Double Quotes
details
16pass FAIL Escaped quote in [[ ]]
details
17pass pass Quoting " within ``
18pass pass Quoting $ within ``
19pass pass Quoting $ within `` within double quotes
20pass pass Quoting \ within ``
21pass pass Quoting \ within `` within double quotes
22pass pass Quoting ( within ``
23pass pass Quoting ( within `` within double quotes
24pass pass Quoting non-special characters within ``
25pass pass Quoting non-special characters within `` within double quotes
26pass pass Quoting double quotes within backticks
27pass pass More levels of double quotes in backticks
28pass pass Syntax errors with double quotes within backticks
29pass pass Empty command sub $() (command::NoOp)
49 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh-cpp1 case in subshell

[osh-cpp stdout] Expected 'letter\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(foo=a; case $foo in [0-9]) echo number;; [a-z]) echo letter ;; esac)
                                                                            ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp2 Command sub word part

[osh-cpp stdout] Expected 'FOObarFOO\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  foo=FOO; echo $(echo $foo)bar$(echo $foo)
                           ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp6 Making command out of command sub should work

[osh-cpp stdout] Expected 'split builtin\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  $(echo ec)$(echo ho) split builtin
           ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp8 Command sub with here doc

[osh-cpp stdout] Expected 'two one\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  )
  ^
[ stdin ]:5: Unexpected EOF while parsing command
osh-cpp10 Command Sub word split

[osh-cpp stdout] Expected "['hi', 'there', 'hi there']\n" Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  argv.py $(echo 'hi there') "$(echo 'hi there')"
                           ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp11 Command Sub trailing newline removed

[osh-cpp stdout] Expected "['ab\\ncd']\n" Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  s=$(python2 -c 'print("ab\ncd\n")')
                                    ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp12 Command Sub trailing whitespace not removed

[osh-cpp stdout] Expected "['ab\\ncd\\n ']\n" Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  s=$(python2 -c 'print("ab\ncd\n ")')
                                     ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp13 Command Sub and exit code

[osh-cpp stdout] Expected 'x\n0\n33\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo $(echo x; exit 33)
                        ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp14 Command Sub in local sets exit code

[osh-cpp stdout] Expected 'x\n0\n0\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
    echo $(echo x; exit 33)
                          ^
[ stdin ]:2: Invalid word while parsing command list
osh-cpp15 Double Quotes in Command Sub in Double Quotes

[osh-cpp stdout] Expected 'x hi\nx hi\nx "hi"\nx hi\nx hi\nx hi\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo "x $(echo hi)"
                   ^
[ stdin ]:1: Invalid word while parsing command list
osh-cpp16 Escaped quote in [[ ]]

[osh-cpp stdout] Expected '123 456\n"\n' Got ''
[osh-cpp status] Expected 0 Got 2

stdout:
stderr: 
  echo "123 `[[ $(echo \\" > $file) ]]` 456";
                                 ^
[ backticks in [ stdin ] ]:2: Invalid word while parsing command list