326 passed, 18 OK, 27 not implemented, 7 BUG, 164 failed, 4 timeouts, 0 cases skipped 2 failed under osh
mksh | 0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4) stdout: stderr: mksh: <stdin>[3]: empty[@]: parameter not set |
ksh | 0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4) [ksh stdout] Expected '[]\nstatus=0\n', got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[3]: empty[@]: parameter not set |
toysh | 0 nounset / set -u with empty array (bug in bash 4.3, fixed in 4.4) [toysh stdout] Expected '[]\nstatus=0\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: set: bad -o nounset main: line 2: sh: syntax error: argv.py |
mksh | 1 local array stdout: stderr: mksh: <stdin>[2]: syntax error: '(' unexpected |
ksh | 1 local array [ksh stdout] Expected "['1']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[2]: syntax error: unexpected '(' |
toysh | 1 local array [toysh stdout] Expected "['1']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: ) |
toysh | 2 Command with with word splitting in array [toysh stdout] Expected "['1 2', '3', '4']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: '1 2' |
mksh | 3 space before ( in array initialization stdout: 1stderr: |
ksh | 3 space before ( in array initialization [ksh status] Expected 2, got 0 stdout: 1stderr: |
sush | 3 space before ( in array initialization [sush status] Expected 2, got 0 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: (1 |
brush | 3 space before ( in array initialization [brush status] Expected 2, got 0 stdout: 1stderr: |
toysh | 4 array over multiple lines [toysh stdout] Expected "['1', '2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: function( |
mksh | 5 array with invalid token stdout: stderr: mksh: <stdin>[3]: syntax error: '&' unexpected |
ksh | 5 array with invalid token [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[3]: syntax error: unexpected '&' |
sush | 5 array with invalid token [sush status] Expected 2, got 0 stdout: []stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: syntax error near & |
brush | 5 array with invalid token [brush status] Expected 2, got 0 stdout: []stderr: [31mERROR[0m main: syntax error near token `&' (line 3 col 1) 2 3: command not found [31mERROR[0m main: syntax error near token `)' (line 1 col 1) |
toysh | 6 array with empty string [toysh stdout] Expected "['']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: '' |
sush | 6 array with empty string [sush stdout] Expected "['']\n", got '[]\n' stdout: []stderr: |
toysh | 7 Retrieve index [toysh stdout] Expected "['2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 8 Retrieve out of bounds index [toysh stdout] Expected "['']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
mksh | 9 Negative index stdout: ['', '', '']stderr: |
ksh | 9 Negative index [ksh stdout] Expected "['2 3', '1', '']\n", got "['', '', '']\n" stdout: ['', '', '']stderr: |
toysh | 9 Negative index [toysh stdout] Expected "['2 3', '1', '']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
sush | 9 Negative index [sush stdout] Expected "['2 3', '1', '']\n", got "['', '', '']\n" stdout: ['', '', '']stderr: |
mksh | 10 Negative index and sparse array stdout: 0 2 3 -1 -2 -3 -4 -5 0 2 3 0 0 2 3 42stderr: |
ksh | 10 Negative index and sparse array [ksh stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1\n-2\n-3\n-4\n-5\n0 2 3 0\n0 2 3 42\n' stdout: 0 2 3 -1 -2 -3 -4 -5 0 2 3 0 0 2 3 42stderr: |
toysh | 10 Negative index and sparse array [toysh stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 0 |
sush | 10 Negative index and sparse array [sush stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1\n-2\n-3\n-4\n-5\n0 2 3\n0 2 3\n' stdout: 0 2 3 -1 -2 -3 -4 -5 0 2 3 0 2 3stderr: |
brush | 10 Negative index and sparse array [brush stdout] Expected '0 2 3\n-1 3\n-2 2\n-3\n-4 0\n-5\n0 2 30\n0 2 72\n' Got '0 2 3\n-1 2\n-2\n-3 0\n-4\n-5\n00 2 3\n44 2 3\n' stdout: 0 2 3 -1 2 -2 -3 0 -4 -5 00 2 3 44 2 3stderr: |
mksh | 11 Negative index and sparse array stdout: 0 0 1 1 2 2 3 3stderr: |
ksh | 11 Negative index and sparse array [ksh stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0 0\n1 1\n2 2\n3 3\n' stdout: 0 0 1 1 2 2 3 3stderr: |
toysh | 11 Negative index and sparse array [toysh stdout] Expected '0 0\n2 2\n3 3\n0\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 0 |
sush | 11 Negative index and sparse array [sush stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0 0\n1 1\n2 2\n3 3\n' stdout: 0 0 1 1 2 2 3 3stderr: |
brush | 11 Negative index and sparse array [brush stdout] Expected '0 0\n2 2\n3 3\n0\n', got '0\n1 1\n2 2\n3 3\n' stdout: 0 1 1 2 2 3 3stderr: |
mksh | 12 Length after unset stdout: len=4 len=4stderr: |
ksh | 12 Length after unset [ksh stdout] Expected 'len=3\nlen=2\n', got 'len=4\nlen=4\n' stdout: len=4 len=4stderr: |
toysh | 12 Length after unset [toysh stdout] Expected 'len=3\nlen=2\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 0 |
sush | 12 Length after unset [sush stdout] Expected 'len=3\nlen=2\n', got 'len=4\nlen=4\n' stdout: len=4 len=4stderr: |
brush | 12 Length after unset [brush stdout] Expected 'len=3\nlen=2\n', got 'len=3\nlen=3\n' stdout: len=3 len=3stderr: |
toysh | 13 Retrieve index that is a variable [toysh stdout] Expected "['2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 14 Retrieve index that is a variable without $ [toysh stdout] Expected "['2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 15 Retrieve index that is a command sub [toysh stdout] Expected "['2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 16 Retrieve array indices with ${!a} [toysh stdout] Expected "['0', '1']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
mksh | 18 ${!a[1]} is named ref in bash stdout: ['a[1]']stderr: |
ksh | 18 ${!a[1]} is named ref in bash [ksh stdout] Expected "['bar']\n", got "['a[1]']\n" stdout: ['a[1]']stderr: |
toysh | 18 ${!a[1]} is named ref in bash [toysh stdout] Expected "['bar']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 2: sh: syntax error: '1 2' |
mksh | 19 ${!a} on array stdout: ['a']stderr: |
ksh | 19 ${!a} on array [ksh stdout] Expected "['']\n", got "['a']\n" stdout: ['a']stderr: |
toysh | 19 ${!a} on array [toysh stdout] Expected "['']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 20 All elements unquoted [toysh stdout] Expected "['1', '2', '3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 21 All elements quoted [toysh stdout] Expected "['1', '2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 22 $* [toysh stdout] Expected "['1', '2', '3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 23 "$*" [toysh stdout] Expected "['1 2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 24 Interpolate array into array [toysh stdout] Expected "['0', '1', '2 3', '4 5']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 25 Exporting array doesn't do anything, not even first element [toysh stdout] Expected 'mystr\nNone\nNone\n', got 'mystr\n' [toysh status] Expected 0, got 2 stdout: mystrstderr: main: line 6: sh: syntax error: myarray |
sush | 25 Exporting array doesn't do anything, not even first element [sush stdout] Expected 'mystr\nNone\nNone\n', got 'mystr\nmystr\nmystr\n' stdout: mystr mystr mystrstderr: |
brush | 25 Exporting array doesn't do anything, not even first element [brush stdout] Expected 'mystr\nNone\nNone\n', got 'None\nNone\nNone\n' stdout: None None Nonestderr: |
bash | 26 strict_array prevents exporting array stdout: Nonestderr: bash: line 1: shopt: strict_array: invalid shell option name |
mksh | 26 strict_array prevents exporting array stdout: Nonestderr: mksh: <stdin>[1]: shopt: not found |
ksh | 26 strict_array prevents exporting array [ksh stdout] Expected '', got 'None\n' [ksh status] Expected 1, got 0 stdout: Nonestderr: E: ksh: <stdin>[1]: shopt: inaccessible or not found |
toysh | 26 strict_array prevents exporting array [toysh status] Expected 1, got 2 stdout: stderr: sh: shopt: No such file or directory main: line 4: sh: syntax error: a |
sush | 26 strict_array prevents exporting array [sush stdout] Expected '', got '\n' [sush status] Expected 1, got 0 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet |
brush | 26 strict_array prevents exporting array [brush stdout] Expected '', got 'None\n' [brush status] Expected 1, got 0 stdout: Nonestderr: shopt: strict_array: invalid shell option name |
bash | 27 Arrays can't be used as env bindings stdout: a (b b)stderr: |
mksh | 27 Arrays can't be used as env bindings stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
ksh | 27 Arrays can't be used as env bindings [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[1]: syntax error: unexpected '(' |
sush | 27 Arrays can't be used as env bindings [sush stdout] Expected u'', got 'a\n\n' [sush status] Expected 2, got 0 stdout: astderr: |
brush | 27 Arrays can't be used as env bindings [brush stdout] Expected u'', got 'a\nb\n' [brush status] Expected 2, got 0 stdout: a bstderr: |
bash | 28 Associative arrays can't be used as env bindings either stdout: a ([k]=v)stderr: |
mksh | 28 Associative arrays can't be used as env bindings either stdout: stderr: mksh: <stdin>[1]: syntax error: '(' unexpected |
ksh | 28 Associative arrays can't be used as env bindings either [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[1]: syntax error: unexpected '(' |
sush | 28 Associative arrays can't be used as env bindings either [sush stdout] Expected u'', got 'a\n\n' [sush status] Expected 2, got 0 stdout: astderr: |
brush | 28 Associative arrays can't be used as env bindings either [brush stdout] Expected u'', got 'a\nv\n' [brush status] Expected 2, got 0 stdout: a vstderr: |
toysh | 29 Set element [toysh stdout] Expected "['9', '2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 30 Set element with var ref [toysh stdout] Expected "['9', '2 3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 31 Set element with array ref [toysh stdout] Expected "['1', '9']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
brush | 31 Set element with array ref [brush stdout] Expected "['1', '9']\n", got "['1', '2 3']\n" stdout: ['1', '2 3']stderr: a[1]=9: command not found |
bash | 32 Set array item to array stdout: status=1stderr: bash: line 2: a[0]: cannot assign list to array member |
mksh | 32 Set array item to array stdout: stderr: mksh: <stdin>[2]: set: a[0]: is not an identifier |
ksh | 32 Set array item to array [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[2]: set: a[0]: not an identifier |
sush | 32 Set array item to array [sush stdout] Expected u'', got 'status=1\n' [sush status] Expected 2, got 0 stdout: status=1stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: a[0]: cannot assign list to array member |
brush | 32 Set array item to array [brush stdout] Expected u'', got 'status=1\n' [brush status] Expected 2, got 0 stdout: status=1stderr: [31mERROR[0m error: not yet implemented: replacing an array item with an array |
mksh | 33 Slice of array with [@] stdout: stderr: mksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
ksh | 33 Slice of array with [@] [ksh stdout] Expected "['2', '3']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${a[@]: 1:2}: bad substitution |
toysh | 33 Slice of array with [@] [toysh stdout] Expected "['2', '3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
mksh | 34 Negative slice begin stdout: stderr: mksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution |
ksh | 34 Negative slice begin [ksh stdout] Expected "['2', '3', '4', '5']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${a[@]: (-4)}: bad substitution |
toysh | 34 Negative slice begin [toysh stdout] Expected "['2', '3', '4', '5']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 35 Negative slice length [toysh status] Expected 1, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
brush | 35 Negative slice length [brush stdout] Expected u'', got "['2', '3']\n" [brush status] Expected 1, got 0 stdout: ['2', '3']stderr: |
mksh | 36 Slice with arithmetic stdout: stderr: mksh: <stdin>[3]: ${a[@]:i-4:2}: bad substitution |
ksh | 36 Slice with arithmetic [ksh stdout] Expected "['2', '3']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[3]: ${a[@]: i-4:2}: bad substitution |
toysh | 36 Slice with arithmetic [toysh stdout] Expected "['2', '3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 37 Number of elements [toysh stdout] Expected '2 2\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 38 Length of an element [toysh stdout] Expected '3\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 39 Iteration [toysh stdout] Expected '1\n2 3\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
toysh | 40 glob within array yields separate elements [toysh stdout] Expected "['_tmp/y.Y', '_tmp/yy.Y']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 2: sh: syntax error: _tmp/*.Y |
toysh | 41 declare array and then append [toysh stdout] Expected "['a', 'b', 'c']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 2: sh: syntax error: a |
bash | 42 Array syntax in wrong place stdout: stderr: bash: line 1: syntax error near unexpected token `(' bash: line 1: `ls foo=(1 2)' |
toysh | 42 Array syntax in wrong place [toysh status] Expected 1, got 2 stdout: stderr: main: line 1: sh: syntax error: ) |
sush | 42 Array syntax in wrong place [sush status] Expected 1, got 2 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: Unexpected token: (1 |
brush | 42 Array syntax in wrong place [brush status] Expected 1, got 2 stdout: stderr: ls: cannot access 'foo=(1': No such file or directory ls: cannot access '2)': No such file or directory |
toysh | 43 Single array with :- [toysh stdout] Expected "['none', 'x', 'none']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: '' |
sush | 43 Single array with :- [sush stdout] Expected "['none', 'x', 'none']\n", got "['none', 'x']\n" stdout: ['none', 'x']stderr: |
mksh | 44 Stripping a whole array unquoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
ksh | 44 Stripping a whole array unquoted [ksh stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
toysh | 44 Stripping a whole array unquoted [toysh stdout] Expected "['foo', 'sp', 'ace.h', 'bar']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 'foo.c' |
mksh | 45 Stripping a whole array quoted stdout: stderr: mksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
ksh | 45 Stripping a whole array quoted [ksh stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${files[@]%.c}: bad substitution |
toysh | 45 Stripping a whole array quoted [toysh stdout] Expected "['foo', 'sp ace.h', 'bar']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 'foo.c' |
bash | 46 Multiple subscripts not allowed stdout: stderr: bash: line 2: ${a[0][0]}: bad substitution |
mksh | 46 Multiple subscripts not allowed stdout: stderr: mksh: <stdin>[2]: ${a[0][0]}: bad substitution |
ksh | 46 Multiple subscripts not allowed [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${a[0][0]}: bad substitution |
sush | 46 Multiple subscripts not allowed [sush status] Expected 2, got 1 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: `${a[0][0]}': bad substitution |
brush | 46 Multiple subscripts not allowed [brush stdout] Expected u'', got "['123', '${a[0][0]}']\n" [brush status] Expected 2, got 0 stdout: ['123', '${a[0][0]}']stderr: |
bash | 47 Length op, index op, then transform op is not allowed stdout: stderr: bash: line 2: ${#a[0]/1/xxx}: bad substitution |
mksh | 47 Length op, index op, then transform op is not allowed stdout: stderr: mksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
ksh | 47 Length op, index op, then transform op is not allowed [ksh status] Expected 2, got 1 stdout: stderr: E: ksh: <stdin>[2]: ${#a[0]/1/xxx}: bad substitution |
sush | 47 Length op, index op, then transform op is not allowed [sush stdout] Expected u'', got '3 3\n' [sush status] Expected 2, got 0 stdout: 3 3stderr: |
brush | 47 Length op, index op, then transform op is not allowed [brush stdout] Expected u'', got '3 ${#a[0]/1/xxx}\n' [brush status] Expected 2, got 0 stdout: 3 ${#a[0]/1/xxx}stderr: |
toysh | 48 ${mystr[@]} and ${mystr[*]} are no-ops [toysh stdout] Expected 'abc\nabc\n', got '' [toysh status] Expected 0, got 1 stdout: stderr: main: line 2: sh: s: [@]} main: line 3: sh: s: [*]} |
bash | 49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array stdout: abc status=0 abc status=0stderr: bash: line 1: shopt: strict_array: invalid shell option name bash: line 1: shopt: strict_array: invalid shell option name |
mksh | 49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array stdout: abc status=0 abc status=0stderr: mksh: shopt: not found mksh: shopt: not found |
ksh | 49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array [ksh stdout] Expected 'status=1\nstatus=1\n', got 'abc\nstatus=0\nabc\nstatus=0\n' stdout: abc status=0 abc status=0stderr: E: ksh: shopt: inaccessible or not found E: ksh: shopt: inaccessible or not found |
sush | 49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array [sush stdout] Expected 'status=1\nstatus=1\n', got 'abc\nstatus=0\nabc\nstatus=0\n' stdout: abc status=0 abc status=0stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: shopt: strict_array: not supported yet |
brush | 49 ${mystr[@]} and ${mystr[*]} disallowed with strict_array [brush stdout] Expected 'status=1\nstatus=1\n', got 'abc\nstatus=0\nabc\nstatus=0\n' stdout: abc status=0 abc status=0stderr: shopt: strict_array: invalid shell option name shopt: strict_array: invalid shell option name |
toysh | 50 Create a "user" array out of the argv array [toysh stdout] Expected "['x y', 'z', 'a b', 'c']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: set: bad -- main: line 2: sh: syntax error: 'x y' |
toysh | 51 Tilde expansion within array [toysh stdout] Expected '/home/bob/src /home/bob/git\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 2: sh: syntax error: ~/src |
toysh | 52 Brace Expansion within Array [toysh stdout] Expected '-a -b c- d-\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: -{a,b} |
toysh | 53 array default [toysh stdout] Expected "['1 2', '3']\n", got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: '1 2' |
sush | 53 array default [sush stdout] Expected "['1 2', '3']\n", got '[]\n' stdout: []stderr: |
brush | 53 array default [brush stdout] Expected "['1 2', '3']\n", got "['1 2 3']\n" stdout: ['1 2 3']stderr: |
bash | 54 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
mksh | 54 Singleton Array Copy and Assign. OSH can't index strings with ints stdout: 4 4 1 1 4 4 1 1stderr: |
ksh | 54 Singleton Array Copy and Assign. OSH can't index strings with ints [ksh stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n1 1\n' [ksh status] Expected 1, got 0 stdout: 4 4 1 1 4 4 1 1stderr: |
toysh | 54 Singleton Array Copy and Assign. OSH can't index strings with ints [toysh stdout] Expected '4 4\n1 1\n', got '' [toysh status] Expected 1, got 2 stdout: stderr: main: line 1: sh: syntax error: '12 3' |
sush | 54 Singleton Array Copy and Assign. OSH can't index strings with ints [sush stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n0 0\n' [sush status] Expected 1, got 0 stdout: 4 4 1 1 4 4 0 0stderr: |
brush | 54 Singleton Array Copy and Assign. OSH can't index strings with ints [brush stdout] Expected '4 4\n1 1\n', got '4 4\n1 1\n4 4\n1 1\n' [brush status] Expected 1, got 0 stdout: 4 4 1 1 4 4 1 1stderr: |
toysh | 55 declare -a / local -a is empty array [toysh stdout] Expected "[]\n['x']\n[]\n['x']\n", got "['']\n" [toysh status] Expected 0, got 2 stdout: ['']stderr: main: line 3: sh: syntax error: 'x' |
toysh | 57 Create sparse array implicitly [toysh stdout] Expected "len=1\n['1']\nunset=\nlen-of-unset=0\n", got "['']\nunset=\n" [toysh status] Expected 0, got 1 stdout: [''] unset=stderr: main: line 1: sh: bad math: a[99]=1 @ 2 main: line 2: sh: a: [@]} main: line 5: sh: a: [33]} |
sush | 58 Append sparse arrays [sush stdout] Expected "['1', '2', '3']\n['1', '2', '3']\n", got "['1', '2', '3']\n['', '', '']\n" stdout: ['1', '2', '3'] ['', '', '']stderr: |
mksh | 59 Slice of sparse array with [@] stdout: stderr: mksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution |
ksh | 59 Slice of sparse array with [@] [ksh stdout] Expected "['1', '2']\n", got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[4]: ${a[@]: 15:2}: bad substitution |
toysh | 59 Slice of sparse array with [@] [toysh stdout] Expected "['1', '2']\n", got "['']\n" stdout: ['']stderr: main: line 1: sh: bad math: a[33]=1 @ 2 main: line 2: sh: bad math: a[66]=2 @ 2 main: line 3: sh: bad math: a[99]=2 @ 2 |
brush | 59 Slice of sparse array with [@] [brush stdout] Expected "['1', '2']\n", got '[]\n' stdout: []stderr: |
toysh | 60 Using an array itself as the index on LHS [toysh stdout] Expected "['42', '99', '42', '99', '']\n", got "['', '', '', '']\n" stdout: ['', '', '', '']stderr: sh: shopt: No such file or directory sh: a[a]=42: No such file or directory sh: a[a]=99: No such file or directory |
toysh | 61 Using an array itself as the index on RHS [toysh stdout] Expected '2\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: sh: shopt: No such file or directory main: line 2: sh: syntax error: 1 |
toysh | 62 a[$x$y] on LHS and RHS [toysh stdout] Expected 'foo\n1\n', got '\n' [toysh status] Expected 0, got 1 stdout: stderr: sh: a[12]=foo: No such file or directory main: line 7: sh: a: [@]} |
toysh | 63 Dynamic parsing of LHS a[$code]=value [toysh stdout] Expected "['one', 'two']\nx=1\ny=2\n", got "['']\nx=\ny=\n" stdout: [''] x= y=stderr: sh: array[x=1]=one: No such file or directory sh: array[y=2]=two: No such file or directory |
toysh | 64 Dynamic parsing of RHS ${a[$code]} [toysh stdout] Expected 'three\nthree\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 2: sh: syntax error: zero |
mksh | 65 Is element set? test -v a[i] stdout: set=2 empty=2 unset=2stderr: mksh: <stdin>[3]: test: array[1]: unexpected operator/operand mksh: <stdin>[6]: test: array[3]: unexpected operator/operand mksh: <stdin>[9]: test: array[4]: unexpected operator/operand |
toysh | 65 Is element set? test -v a[i] [toysh stdout] Expected 'set=0\nempty=0\nunset=1\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
sush | 65 Is element set? test -v a[i] [sush stdout] Expected 'set=0\nempty=0\nunset=1\n', got 'set=2\nempty=2\nunset=2\n' stdout: set=2 empty=2 unset=2stderr: test: ‘-v’: unary operator expected test: ‘-v’: unary operator expected test: ‘-v’: unary operator expected |
brush | 65 Is element set? test -v a[i] [brush stdout] Expected 'set=0\nempty=0\nunset=1\n', got 'set=1\nempty=1\nunset=1\n' stdout: set=1 empty=1 unset=1stderr: |
mksh | 66 [[ -v a[i] ]] stdout: stderr: mksh: <stdin>[2]: syntax error: 'array[1]' unexpected operator/operand |
toysh | 66 [[ -v a[i] ]] [toysh stdout] Expected 'status=0\nstatus=1\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
sush | 66 [[ -v a[i] ]] [sush stdout] Expected 'status=0\nstatus=1\n', got 'status=1\nstatus=1\n' stdout: status=1 status=1stderr: |
brush | 66 [[ -v a[i] ]] [brush stdout] Expected 'status=0\nstatus=1\n', got 'status=1\nstatus=1\n' stdout: status=1 status=1stderr: |
mksh | 67 test -v a[i] with arith expressions stdout: status=2 status=2 dbracketstderr: mksh: <stdin>[3]: test: array[1+1]: unexpected operator/operand mksh: <stdin>[6]: test: array[4+1]: unexpected operator/operand mksh: <stdin>[12]: syntax error: 'array[1+1]' unexpected operator/operand |
toysh | 67 test -v a[i] with arith expressions [toysh stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got '' [toysh status] Expected 0, got 2 stdout: stderr: main: line 1: sh: syntax error: 1 |
sush | 67 test -v a[i] with arith expressions [sush stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=2\nstatus=2\n\ndbracket\nstatus=1\nstatus=1\n' stdout: status=2 status=2 dbracket status=1 status=1stderr: test: ‘-v’: unary operator expected test: ‘-v’: unary operator expected |
brush | 67 test -v a[i] with arith expressions [brush stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=1\nstatus=1\n\ndbracket\nstatus=1\nstatus=1\n' stdout: status=1 status=1 dbracket status=1 status=1stderr: |
osh | 67 test -v a[i] with arith expressions [osh stdout] Expected 'status=0\nstatus=1\n\ndbracket\nstatus=0\nstatus=1\n' Got 'status=1\nstatus=1\n\ndbracket\nstatus=1\nstatus=1\n' stdout: status=1 status=1 dbracket status=1 status=1stderr: |
mksh | 68 More arith expressions in [[ -v array[expr]] ]] stdout: stderr: mksh: <stdin>[6]: syntax error: 'array[zero+0]' unexpected operator/operand |
toysh | 68 More arith expressions in [[ -v array[expr]] ]] [toysh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got '' [toysh status] Expected 0, got 2 stdout: stderr: sh: typeset: No such file or directory main: line 2: sh: syntax error: '' |
sush | 68 More arith expressions in [[ -v array[expr]] ]] [sush stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n' stdout: zero=1 one=1 two=1 --- zero=1 one=1 two=1 --- zero=1 one=1 two=1stderr: |
brush | 68 More arith expressions in [[ -v array[expr]] ]] [brush stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n' stdout: zero=1 one=1 two=1 --- zero=1 one=1 two=1 --- zero=1 one=1 two=1stderr: |
osh | 68 More arith expressions in [[ -v array[expr]] ]] [osh stdout] Expected 'zero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n---\nzero=0\none=0\ntwo=1\n' Got 'zero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n---\nzero=1\none=1\ntwo=1\n' stdout: zero=1 one=1 two=1 --- zero=1 one=1 two=1 --- zero=1 one=1 two=1stderr: |
bash | 69 Regression: Assigning with out-of-range negative index stdout: stderr: bash: line 2: a[-1]: bad array subscript |
mksh | 69 Regression: Assigning with out-of-range negative index stdout: stderr: |
ksh | 69 Regression: Assigning with out-of-range negative index [ksh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got '' [ksh status] Expected 1, got 0 stdout: stderr: |
toysh | 69 Regression: Assigning with out-of-range negative index [toysh stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got 'main: line 1: sh: syntax error: a[-1]=1\n' [toysh status] Expected 1, got 2 stdout: stderr: main: line 1: sh: syntax error: a[-1]=1 |
sush | 69 Regression: Assigning with out-of-range negative index [sush stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got '' [sush status] Expected 1, got 0 stdout: stderr: |
brush | 69 Regression: Assigning with out-of-range negative index [brush stderr] Expected ' a[-1]=1\n ^~\n[ stdin ]:2: fatal: Index -1 is out of bounds for array of length 0\n' Got '' [brush status] Expected 1, got 0 stdout: stderr: |
mksh | 70 Regression: Negative index in [[ -v a[index] ]] stdout: stderr: mksh: <stdin>[4]: syntax error: 'a[-1]' unexpected operator/operand |
ksh | 70 Regression: Negative index in [[ -v a[index] ]] [ksh stdout] Expected 'a has -1\na has -6\na has -11\n', got '' [ksh status] Expected 0, got 1 stdout: stderr: |
toysh | 70 Regression: Negative index in [[ -v a[index] ]] [toysh stdout] Expected 'a has -1\na has -6\na has -11\n', got '' [toysh status] Expected 0, got 2 stdout: stderr: sh: a[0]=x: No such file or directory sh: a[5]=y: No such file or directory sh: a[10]=z: No such file or directory [[: too many arguments [[: too many arguments [[: too many arguments [[: too many arguments [[: too many arguments [[: too many arguments |
sush | 70 Regression: Negative index in [[ -v a[index] ]] [sush stdout] Expected 'a has -1\na has -6\na has -11\n', got '' [sush status] Expected 0, got 1 stdout: stderr: |
brush | 70 Regression: Negative index in [[ -v a[index] ]] [brush stdout] Expected 'a has -1\na has -6\na has -11\n', got '' stdout: stderr: |
bash | 71 Regression: Negative out-of-range index in [[ -v a[index] ]] stdout: stderr: bash: line 2: e: bad array subscript |
mksh | 71 Regression: Negative out-of-range index in [[ -v a[index] ]] stdout: stderr: mksh: <stdin>[2]: syntax error: 'e[-1]' unexpected operator/operand |
ksh | 71 Regression: Negative out-of-range index in [[ -v a[index] ]] [ksh stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got '' stdout: stderr: |
sush | 71 Regression: Negative out-of-range index in [[ -v a[index] ]] [sush stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got '' stdout: stderr: |
brush | 71 Regression: Negative out-of-range index in [[ -v a[index] ]] [brush stderr] Expected " [[ -v e[-1] ]] && echo 'e has -1'\n ^\n[ stdin ]:2: fatal: -v got index -1, which is out of bounds for array of length 0\n" Got '' [brush status] Expected 1, got 0 stdout: stderr: |
bash | 72 a+=() modifies existing instance of BashArray stdout: stderr: |
mksh | 72 a+=() modifies existing instance of BashArray stdout: stderr: |
ksh | 72 a+=() modifies existing instance of BashArray [ksh stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n' stdout: a=(1 2 3 4 5) b=()stderr: E: ksh: <stdin>[4]: var: inaccessible or not found |
toysh | 72 a+=() modifies existing instance of BashArray [toysh stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 72 a+=() modifies existing instance of BashArray [sush stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n' stdout: a=(1 2 3 4 5) b=()stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: var: command not found |
brush | 72 a+=() modifies existing instance of BashArray [brush stdout] Expected 'a=(1 2 3 4 5)\nb=(1 2 3 4 5)\n', got 'a=(1 2 3 4 5)\nb=()\n' stdout: a=(1 2 3 4 5) b=()stderr: var: command not found |
bash | 73 Regression: unset a[-2]: out-of-bound negative index should cause error stdout: stderr: bash: line 4: unset: [-2]: bad array subscript |
mksh | 73 Regression: unset a[-2]: out-of-bound negative index should cause error stdout: stderr: |
ksh | 73 Regression: unset a[-2]: out-of-bound negative index should cause error [ksh stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got '' [ksh status] Expected 1, got 0 stdout: stderr: |
toysh | 73 Regression: unset a[-2]: out-of-bound negative index should cause error [toysh stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got 'munmap_chunk(): invalid pointer\n' [toysh status] Expected 1, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 73 Regression: unset a[-2]: out-of-bound negative index should cause error [sush stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got '' [sush status] Expected 1, got 0 stdout: stderr: |
brush | 73 Regression: unset a[-2]: out-of-bound negative index should cause error [brush stderr] Expected " unset -v 'a[-2]'\n ^\n[ stdin ]:4: a[-2]: Index is out of bounds for array of length 1\n" Got '' [brush status] Expected 1, got 0 stdout: stderr: |
mksh | 74 Regression: Out-of-bound negative offset for ${a[@]:offset} stdout: stderr: |
ksh | 74 Regression: Out-of-bound negative offset for ${a[@]:offset} [ksh stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got 'a=(1 2 3 4)\n' [ksh status] Expected 0, got 1 stdout: a=(1 2 3 4)stderr: E: ksh: <stdin>[5]: ${a[*]: -1}: bad substitution |
toysh | 74 Regression: Out-of-bound negative offset for ${a[@]:offset} [toysh stdout] Expected 'a=(1 2 3 4)\nbegin=-1 -> (4)\nbegin=-2 -> (3 4)\nbegin=-3 -> (2 3 4)\nbegin=-4 -> (1 2 3 4)\nbegin=-5 -> ()\n' Got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
mksh | 75 Regression: Array length after unset stdout: stderr: |
ksh | 75 Regression: Array length after unset [ksh stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 2;\n' [ksh status] Expected 0, got 1 stdout: len 2; len 2;stderr: E: ksh: <stdin>[9]: ${a[@]: -1}: bad substitution |
toysh | 75 Regression: Array length after unset [toysh stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 75 Regression: Array length after unset [sush stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 2;\nlast y;\n' stdout: len 2; len 2; last y;stderr: |
brush | 75 Regression: Array length after unset [brush stdout] Expected 'len 2;\nlen 1;\nlast x;\n', got 'len 2;\nlen 1;\nlast y;\n' stdout: len 2; len 1; last y;stderr: |
bash | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` stdout: quoted = ('x' 'y')stderr: |
mksh | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` stdout: stderr: |
ksh | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` [ksh stdout] Expected 'quoted = (x y)\n', got '' [ksh status] Expected 0, got 1 stdout: stderr: E: ksh: <stdin>[5]: ${a[@]@Q}: bad substitution |
toysh | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` [toysh stdout] Expected 'quoted = (x y)\n', got '' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` [sush stdout] Expected 'quoted = (x y)\n', got '' [sush status] Expected 0, got 1 stdout: stderr: /home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 5: `${a[@]@Q}': bad substitution |
brush | 76 Regression: ${a[@]@Q} crash with `a[0]=x a[2]=y` [brush stdout] Expected 'quoted = (x y)\n', got "quoted = ('x' 'y')\n" stdout: quoted = ('x' 'y')stderr: |
bash | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) stdout: [] 0 [0] 0stderr: bash: line 4: a: bad array subscript bash: line 6: a: bad array subscript |
mksh | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) stdout: stderr: |
ksh | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) [ksh stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got '' stdout: [] 0 [0] 0stderr: |
toysh | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) [toysh stdout] Expected '[]\n0\n[0]\n0\n', got '' [toysh stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got 'munmap_chunk(): invalid pointer\n' [toysh status] Expected 0, got -6 stdout: stderr: munmap_chunk(): invalid pointer |
sush | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) [sush stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got '' stdout: [] 0 [0] 0stderr: |
brush | 77 Regression: silent out-of-bound negative index in ${a[-2]} and $((a[-2])) [brush stdout] Expected '[]\n0\n[0]\n0\n', got '[]\n0\n1\n' [brush stderr] Expected ' echo "[${a[-2]}]"\n ^\n[ stdin ]:4: Index -2 out of bounds for array of length 1\n echo "[$((a[-2]))]"\n ^\n[ stdin ]:6: Index -2 out of bounds for array of length 1\n' Got '\x1b[31mERROR\x1b[0m error: arithmetic evaluation error: failed to access array\n' stdout: [] 0 1stderr: [31mERROR[0m error: arithmetic evaluation error: failed to access array |