spec test index / oilshell.org
44 passed, 4 OK, 1 not implemented, 1 BUG, 4 failed, 0 timeouts, 0 cases skipped
bash | 2 ${!undef:-} [bash stdout] Expected 'undef=default\nundef=\nNOUNSET\nundef=default\n' Got 'NOUNSET\n' stdout: NOUNSETstderr: bash: line 1: undef: invalid indirect expansion bash: line 2: undef: invalid indirect expansion bash: line 6: undef: invalid indirect expansion bash: line 7: undef: invalid indirect expansion |
bash | 3 comparison to ${!array[@]} keys (similar SYNTAX) [bash stdout] Expected "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['A', 'B']\nA_keys=0\n['']\nA_nobrackets=0\n" Got "['0', '1']\na_keys=0\n['']\na_nobrackets=0\n---\n['B', 'A']\nA_keys=0\n['']\nA_nobrackets=0\n" stdout: ['0', '1'] a_keys=0 [''] a_nobrackets=0 --- ['B', 'A'] A_keys=0 [''] A_nobrackets=0stderr: |
bash | 4 ${!a[@]-'default'} is illegal [bash stdout] Expected "['default']\nstatus=0\nstatus=1\n", got 'status=1\nstatus=1\n' stdout: status=1 status=1stderr: bash: line 1: a[@]: invalid indirect expansion bash: line 5: x y z: invalid variable name |
bash | 15 array ref with strict_array stdout: alestderr: bash: line 1: shopt: strict_array: invalid shell option name |
bash | 20 Bizarre tilde expansion in array index [bash stdout] Expected 'y\n', got '' [bash status] Expected 0, got 1 stdout: stderr: bash: line 4: ~+: syntax error: operand expected (error token is "+") |
bash | 21 Indirect expansion TO fancy expansion features bash disallows stdout: donestderr: main: line 2: a[0: invalid variable name main: line 2: aa[k: invalid variable name main: line 2: !x: invalid variable name main: line 2: !a[0]: invalid variable name main: line 2: x:-foo: invalid variable name main: line 2: x:=foo: invalid variable name main: line 2: x:?oops: invalid variable name main: line 2: x:+yy: invalid variable name main: line 2: x:0: invalid variable name main: line 2: x:0:1: invalid variable name main: line 2: !a@: invalid variable name main: line 2: #x: invalid variable name main: line 2: x#y: invalid variable name main: line 2: x/y/foo: invalid variable name main: line 2: x@Q: invalid variable name |
osh | 22 Bad var ref stdout: stderr: bad var name ^ [ contents of var 'a' at line 2 of [ stdin ] ]:1: Expected end of var ref expression echo ref ${!a} ^ [ stdin ]:2: fatal: Invalid var ref expression |
osh | 23 Bad var ref 2 stdout: stderr: / ^ [ contents of var 'b' at line 2 of [ stdin ] ]:1: Expected var name echo ref ${!b} ^ [ stdin ]:2: fatal: Invalid var ref expression |
bash | 25 var ref doesn't need cycle detection stdout: cycle=x cycle=stderr: bash: line 7: warning: a: circular name reference |
bash | 26 Var Ref Code Injection $(tee PWNED) stdout: 42 PWNED 0stderr: |