spec test index / oilshell.org
88 passed, 11 OK, 8 not implemented, 7 BUG, 7 failed, 0 timeouts, 0 cases skipped 7 failed under osh
mksh | 2 pass assoc array by reference stdout: [monday]=eggsstderr: |
mksh | 3 pass local array by reference, relying on DYNAMIC SCOPING stdout: stderr: mksh: <stdin>[7]: syntax error: '(' unexpected |
mksh | 6 flag -n combined ${!ref} -- bash INVERTS stdout: ref=x !ref=ref NOW A NAMEREF ref=foo !ref=xstderr: |
osh | 6 flag -n combined ${!ref} -- bash INVERTS [osh stdout] Expected 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=x\n', got 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=FOO\n' stdout: ref=x !ref=foo NOW A NAMEREF ref=foo !ref=FOOstderr: |
osh_ALT | 6 flag -n combined ${!ref} -- bash INVERTS [osh_ALT stdout] Expected 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=x\n', got 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=FOO\n' stdout: ref=x !ref=foo NOW A NAMEREF ref=foo !ref=FOOstderr: |
mksh | 7 named ref with $# doesn't work stdout: ref=# ref=3stderr: |
bash | 8 named ref with $# and shopt -s strict_nameref stdout: ref=# ref=#stderr: bash: line 1: shopt: strict_nameref: invalid shell option name bash: line 5: typeset: `#': invalid variable name for name reference |
mksh | 8 named ref with $# and shopt -s strict_nameref stdout: ref=# ref=0stderr: mksh: <stdin>[1]: shopt: not found |
mksh | 9 named ref with 1 $1 etc. stdout: ref=1 ref=one ref2=$1stderr: mksh: <stdin>[12]: ref2: empty nameref target |
mksh | 10 assign to invalid ref stdout: ref=1 ref=stderr: mksh: <stdin>[7]: read-only: ref |
bash | 11 assign to invalid ref with strict_nameref stdout: stderr: |
mksh | 11 assign to invalid ref with strict_nameref stdout: stderr: |
mksh | 12 name ref on Undef cell stdout: stderr: mksh: <stdin>[1]: ref: empty nameref target |
mksh | 13 assign to empty nameref and invalid nameref stdout: stderr: mksh: <stdin>[1]: ref: empty nameref target |
mksh | 14 -n attribute before it has a value stdout: stderr: mksh: <stdin>[1]: ref: empty nameref target |
bash | 15 -n attribute on array is hard error, not a warning stdout: hi ref=xstderr: bash: line 5: warning: ref: removing nameref attribute |
mksh | 15 -n attribute on array is hard error, not a warning stdout: stderr: mksh: <stdin>[2]: ref: empty nameref target |
mksh | 16 exported nameref stdout: None None --- foo Nonestderr: |
bash | 18 readonly var can't be assigned through nameref stdout: ref=X ref=XX ref=XX x=XXstderr: bash: line 11: x: readonly variable |
mksh | 18 readonly var can't be assigned through nameref stdout: ref=X ref=XXstderr: mksh: <stdin>[11]: read-only: ref |
bash | 21 Mutually recursive namerefs detected on READ stdout: defined ref1= ref2=stderr: bash: line 4: warning: ref1: circular name reference bash: line 5: warning: ref1: circular name reference |
mksh | 21 Mutually recursive namerefs detected on READ stdout: stderr: mksh: <stdin>[2]: ref2: expression recurses on parameter |
bash | 22 Mutually recursive namerefs detected on WRITE stdout: defined 0 mutated 1stderr: bash: line 4: warning: ref1: circular name reference |
mksh | 22 Mutually recursive namerefs detected on WRITE stdout: stderr: mksh: <stdin>[2]: ref2: expression recurses on parameter |
osh | 25 a[2] in nameref (eval_unsafe_arith) [osh stdout] Expected 'ref=two\n', got 'ref=a[2]\n' stdout: ref=a[2]stderr: |
osh_ALT | 25 a[2] in nameref (eval_unsafe_arith) [osh_ALT stdout] Expected 'ref=two\n', got 'ref=a[2]\n' stdout: ref=a[2]stderr: |
osh | 26 a[expr] in nameref (eval_unsafe_arith) [osh stdout] Expected 'ref=three\n', got 'ref=a[$(echo 2) + 1]\n' stdout: ref=a[$(echo 2) + 1]stderr: |
osh_ALT | 26 a[expr] in nameref (eval_unsafe_arith) [osh_ALT stdout] Expected 'ref=three\n', got 'ref=a[$(echo 2) + 1]\n' stdout: ref=a[$(echo 2) + 1]stderr: |
mksh | 27 a[@] in nameref (eval_unsafe_arith) stdout: stderr: mksh: <stdin>[1]: shopt: not found mksh: <stdin>[5]: @: unexpected '@' |
osh | 27 a[@] in nameref (eval_unsafe_arith) [osh stdout] Expected "['ref', 'A B C']\nstatus=1\n['ref[@]']\n['ref', 'A B C']\n['a[@]', 'A B', 'C']\n", got "['ref', 'a[@]']\nstatus=0\n['ref[@]', 'X', 'Y', 'Z']\n" [osh status] Expected 0, got 1 stdout: ['ref', 'a[@]'] status=0 ['ref[@]', 'X', 'Y', 'Z']stderr: argv.py ref "$ref" # JOINING mangles the array? ^~~~ [ stdin ]:9: fatal: Array 'ref' can't be referred to as a scalar (without @ or *) |
osh_ALT | 27 a[@] in nameref (eval_unsafe_arith) [osh_ALT stdout] Expected "['ref', 'A B C']\nstatus=1\n['ref[@]']\n['ref', 'A B C']\n['a[@]', 'A B', 'C']\n", got "['ref', 'a[@]']\nstatus=0\n['ref[@]', 'X', 'Y', 'Z']\n" [osh_ALT status] Expected 0, got 1 stdout: ['ref', 'a[@]'] status=0 ['ref[@]', 'X', 'Y', 'Z']stderr: argv.py ref "$ref" # JOINING mangles the array? ^~~~ [ stdin ]:9: fatal: Array 'ref' can't be referred to as a scalar (without @ or *) |
mksh | 29 bad mutation through nameref: ref[0]= where ref is array[0] stdout: status=0 foo Y Zstderr: |
osh | 29 bad mutation through nameref: ref[0]= where ref is array[0] [osh stdout] Expected 'status=1\nX Y Z\n', got '' [osh status] Expected 0, got 1 stdout: stderr: ref[0]=foo # error in bash: 'array[0]': not a valid identifier ^~~~ [ stdin ]:3: fatal: Can't assign to items in a string |
osh_ALT | 29 bad mutation through nameref: ref[0]= where ref is array[0] [osh_ALT stdout] Expected 'status=1\nX Y Z\n', got '' [osh_ALT status] Expected 0, got 1 stdout: stderr: ref[0]=foo # error in bash: 'array[0]': not a valid identifier ^~~~ [ stdin ]:3: fatal: Can't assign to items in a string |
bash | 30 @ in nameref isn't supported, unlike in ${!ref} stdout: status=1 ref= status=0stderr: bash: line 1: shopt: eval_unsafe_arith: invalid shell option name bash: line 4: typeset: `@': invalid variable name for name reference |
osh | 30 @ in nameref isn't supported, unlike in ${!ref} [osh stdout] Expected u'', got 'status=0\nref=@\nstatus=0\n' [osh status] Expected 1, got 0 stdout: status=0 ref=@ status=0stderr: |
osh_ALT | 30 @ in nameref isn't supported, unlike in ${!ref} [osh_ALT stdout] Expected u'', got 'status=0\nref=@\nstatus=0\n' [osh_ALT status] Expected 1, got 0 stdout: status=0 ref=@ status=0stderr: |
mksh | 31 Unquoted assoc reference on RHS stdout: stderr: mksh: <stdin>[1]: typeset: -A: unknown option mksh: <stdin>[2]: 'foo': multi-character character constant |
osh | 31 Unquoted assoc reference on RHS [osh stdout] Expected "['bar']\n", got "['bashup_ev_r[foo]']\n" stdout: ['bashup_ev_r[foo]']stderr: |
osh_ALT | 31 Unquoted assoc reference on RHS [osh_ALT stdout] Expected "['bar']\n", got "['bashup_ev_r[foo]']\n" stdout: ['bashup_ev_r[foo]']stderr: |