status | osh | osh-cpp | |
pass | 1 | 1 | |
FAIL | 6 | 6 | |
total | 7 | 7 | |
case | osh | osh-cpp | description |
0 | pass | pass | Indexed LHS without spaces, and += |
1 | FAIL | FAIL | Indexed LHS with spaces |
details | details | ||
2 | FAIL | FAIL | Multiple LHS array words |
details | details | ||
3 | FAIL | FAIL | LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]' |
details | details | ||
4 | FAIL | FAIL | file named a[ is not executed |
details | details | ||
5 | FAIL | FAIL | More fragments like a[ a[5 a[5 + a[5 + 3] |
details | details | ||
6 | FAIL | FAIL | Are quotes allowed? |
details | details |
2 passed, 0 OK, 0 not implemented, 0 BUG, 6 failed, 0 timeouts, 0 cases skipped 6 failed under osh
osh | 1 Indexed LHS with spaces [osh stdout] Expected "status=0\n['x', 'z']\n", got 'status=127\n[]\n' stdout: status=127 []stderr: a[1 * 1]=x ^~ [ stdin ]:3: Command 'a[1' not found (OILS-ERR-100) a[ 1 + 2 ]=z ^~ [ stdin ]:4: Command 'a[' not found (OILS-ERR-100) |
osh-cpp | 1 Indexed LHS with spaces [osh-cpp stdout] Expected "status=0\n['x', 'z']\n", got 'status=127\n[]\n' stdout: status=127 []stderr: a[1 * 1]=x ^~ [ stdin ]:3: Command 'a[1' not found (OILS-ERR-100) a[ 1 + 2 ]=z ^~ [ stdin ]:4: Command 'a[' not found (OILS-ERR-100) |
osh | 2 Multiple LHS array words [osh stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got 'declare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n---\nstatus=127\ndeclare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n' stdout: declare -a a=(0 1 2) declare -a b=(3 4 5) --- status=127 declare -a a=(0 1 2) declare -a b=(3 4 5)stderr: a[0 + 1]= b[2 + 0]=~/src ^~ [ stdin ]:9: Command 'a[0' not found (OILS-ERR-100) a[0 + 1]='foo' argv.py b[2 + 0]='bar' ^~ [ stdin ]:15: Command 'a[0' not found (OILS-ERR-100) |
osh-cpp | 2 Multiple LHS array words [osh-cpp stdout] Expected 'declare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n---\n[\'b[2\', \'+\', \'0]=bar\']\nstatus=0\ndeclare -a a=([0]="0" [1]="" [2]="2")\ndeclare -a b=([0]="3" [1]="4" [2]="/home/spec-test/src")\n' Got 'declare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n---\nstatus=127\ndeclare -a a=(0 1 2)\ndeclare -a b=(3 4 5)\n' stdout: declare -a a=(0 1 2) declare -a b=(3 4 5) --- status=127 declare -a a=(0 1 2) declare -a b=(3 4 5)stderr: a[0 + 1]= b[2 + 0]=~/src ^~ [ stdin ]:9: Command 'a[0' not found (OILS-ERR-100) a[0 + 1]='foo' argv.py b[2 + 0]='bar' ^~ [ stdin ]:15: Command 'a[0' not found (OILS-ERR-100) |
osh | 3 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]' [osh stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got 'declare -a b=(3 4 5)\n' [osh status] Expected 0, got 1 stdout: declare -a b=(3 4 5)stderr: a[$(echo 2)] ^~ [ stdin ]:1: fatal: Command subs not allowed here because eval_unsafe_arith is off |
osh-cpp | 3 LHS array is protected with shopt -s eval_unsafe_arith, e.g. 'a[$(echo 2)]' [osh-cpp stdout] Expected 'declare -a b=([0]="3" [1]="4" [2]="5")\nget 5\nset zzz\ndeclare -a b=([0]="3" [1]="4" [2]="zzz")\n' Got 'declare -a b=(3 4 5)\n' [osh-cpp status] Expected 0, got 1 stdout: declare -a b=(3 4 5)stderr: a[$(echo 2)] ^~ [ stdin ]:1: fatal: Command subs not allowed here because eval_unsafe_arith is off |
osh | 4 file named a[ is not executed [osh stdout] Expected 'len=2\n', got 'hi from a[5: 2 args: + 1]=\nhi from a[5: 2 args: / 1]=y\nlen=0\nhi from a[5: 0 args:\n' [osh status] Expected 1, got 0 stdout: hi from a[5: 2 args: + 1]= hi from a[5: 2 args: / 1]=y len=0 hi from a[5: 0 args:stderr: |
osh-cpp | 4 file named a[ is not executed [osh-cpp stdout] Expected 'len=2\n', got 'hi from a[5: 2 args: + 1]=\nhi from a[5: 2 args: / 1]=y\nlen=0\nhi from a[5: 0 args:\n' [osh-cpp status] Expected 1, got 0 stdout: hi from a[5: 2 args: + 1]= hi from a[5: 2 args: / 1]=y len=0 hi from a[5: 0 args:stderr: |
osh | 5 More fragments like a[ a[5 a[5 + a[5 + 3] [osh stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n' stdout: a[ status=127 a[5 status=127 a[5 + status=127 a[5 + 3] status=127 a[5 + 3]= status=127 a[5 + 3]+ status=127 a[5 + 3]+= status=127stderr: a[ ^~ [ -c flag ]:1: Command 'a[' not found (OILS-ERR-100) a[5 ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3] ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]= ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]+ ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]+= ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) |
osh-cpp | 5 More fragments like a[ a[5 a[5 + a[5 + 3] [osh-cpp stdout] Expected 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=0\na[5 + 3]+ status=127\na[5 + 3]+= status=0\n' Got 'a[ status=127\na[5 status=127\na[5 + status=127\na[5 + 3] status=127\na[5 + 3]= status=127\na[5 + 3]+ status=127\na[5 + 3]+= status=127\n' stdout: a[ status=127 a[5 status=127 a[5 + status=127 a[5 + 3] status=127 a[5 + 3]= status=127 a[5 + 3]+ status=127 a[5 + 3]+= status=127stderr: a[ ^~ [ -c flag ]:1: Command 'a[' not found (OILS-ERR-100) a[5 ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3] ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]= ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]+ ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) a[5 + 3]+= ^~ [ -c flag ]:1: Command 'a[5' not found (OILS-ERR-100) |
osh | 6 Are quotes allowed? [osh stdout] Expected '', got 'status=0 len=1\nstatus=0 len=2\nstatus=127 len=2\nstatus=127 len=2\n' [osh status] Expected 1, got 0 stdout: status=0 len=1 status=0 len=2 status=127 len=2 status=127 len=2stderr: a[2 + "3"]=5 ^~ [ stdin ]:7: Command 'a[2' not found (OILS-ERR-100) a[3 + '4']=5 ^~ [ stdin ]:10: Command 'a[3' not found (OILS-ERR-100) |
osh-cpp | 6 Are quotes allowed? [osh-cpp stdout] Expected '', got 'status=0 len=1\nstatus=0 len=2\nstatus=127 len=2\nstatus=127 len=2\n' [osh-cpp status] Expected 1, got 0 stdout: status=0 len=1 status=0 len=2 status=127 len=2 status=127 len=2stderr: a[2 + "3"]=5 ^~ [ stdin ]:7: Command 'a[2' not found (OILS-ERR-100) a[3 + '4']=5 ^~ [ stdin ]:10: Command 'a[3' not found (OILS-ERR-100) |