Results for zsh-assoc.test.sh

statusbashdashashzshmkshkshtoyshsushbrushosh
pass 3007110132
FAIL 4770667645
total7777777777
casebashdashashzshmkshkshtoyshsushbrushoshdescription
0pass FAIL FAIL pass pass pass FAIL pass pass pass TODO: SETUP should be shared
detailsdetailsdetails
1pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass FAIL retrieve key
detailsdetailsdetailsdetailsdetailsdetailsdetails
2FAIL FAIL FAIL pass FAIL FAIL FAIL FAIL FAIL FAIL set key
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
3FAIL FAIL FAIL pass FAIL FAIL FAIL FAIL FAIL FAIL iterate over keys
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
4FAIL FAIL FAIL pass FAIL FAIL FAIL FAIL FAIL FAIL iterate over both keys and values
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
5FAIL FAIL FAIL pass FAIL FAIL FAIL FAIL FAIL FAIL get length
detailsdetailsdetailsdetailsdetailsdetailsdetailsdetailsdetails
6pass FAIL FAIL pass FAIL FAIL FAIL FAIL pass pass index by integer does not work
detailsdetailsdetailsdetailsdetailsdetails
18 passed, 0 OK, 0 not implemented, 0 BUG, 52 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

dash0 TODO: SETUP should be shared

[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash0 TODO: SETUP should be shared

[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
toysh0 TODO: SETUP should be shared

[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: aa
dash1 retrieve key

[dash stdout] Expected 'b\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash1 retrieve key

[ash stdout] Expected 'b\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh1 retrieve key

[mksh stdout] Expected 'b\n', got 'aa\n'

stdout:
aa
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
ksh1 retrieve key

[ksh stdout] Expected 'b\n', got 'aa\n'

stdout:
aa
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh1 retrieve key

[toysh stdout] Expected 'b\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: aa
sush1 retrieve key

[sush stdout] Expected 'b\n', got '\n'

stdout:
stderr: 
osh1 retrieve key

[osh stdout] Expected 'b\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  echo ${a[aa]}
           ^~
[ stdin ]:3: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)
bash2 set key

[bash stdout] Expected "['bar', 'b', 'c', 'XX']\n", got "['c', 'b', 'XX', 'bar']\n"

stdout:
['c', 'b', 'XX', 'bar']
stderr:
dash2 set key

[dash stdout] Expected "['bar', 'b', 'c', 'XX']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash2 set key

[ash stdout] Expected "['bar', 'b', 'c', 'XX']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh2 set key

[mksh stdout] Expected "['bar', 'b', 'c', 'XX']\n", got "['XX', 'b', 'foo', 'bar', 'a+1', 'c']\n"

stdout:
['XX', 'b', 'foo', 'bar', 'a+1', 'c']
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
ksh2 set key

[ksh stdout] Expected "['bar', 'b', 'c', 'XX']\n", got "['XX', 'b', 'foo', 'bar', 'a+1', 'c']\n"

stdout:
['XX', 'b', 'foo', 'bar', 'a+1', 'c']
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh2 set key

[toysh stdout] Expected "['bar', 'b', 'c', 'XX']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: aa
sush2 set key

[sush stdout] Expected "['bar', 'b', 'c', 'XX']\n", got "['aa', 'b', 'foo', 'bar', 'a+1', 'c', 'XX']\n"

stdout:
['aa', 'b', 'foo', 'bar', 'a+1', 'c', 'XX']
stderr:
brush2 set key

[brush stdout] Expected "['bar', 'b', 'c', 'XX']\n", got "['XX', 'c', 'b', 'bar']\n"

stdout:
['XX', 'c', 'b', 'bar']
stderr:
osh2 set key

[osh stdout] Expected "['bar', 'b', 'c', 'XX']\n", got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  a[X]=XX
  ^~
[ stdin ]:3: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)
bash3 iterate over keys

[bash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[bash status] Expected 0, got 1

stdout:
stderr: 
bash: line 3: ${(@k)assoc}: bad substitution
dash3 iterate over keys

[dash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash3 iterate over keys

[ash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh3 iterate over keys

[mksh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[5]: ${(@k)assoc}: bad substitution
ksh3 iterate over keys

[ksh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: typeset: -A: unknown option
E: ksh: <stdin>[5]: ${(@k)assoc}: bad substitution
toysh3 iterate over keys

[toysh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: k1
sush3 iterate over keys

[sush stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[sush status] Expected 0, got 1

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: `${(@k)assoc}': bad substitution
brush3 iterate over keys

[brush stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got '${(@k)assoc}: [${(@k)assoc}]\n'

stdout:
${(@k)assoc}: [${(@k)assoc}]
stderr:
osh3 iterate over keys

[osh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  for k in "${(@k)assoc}"; do
            ^~~~~~
[ stdin ]:3: fatal: ZSH var subs are parsed, but can't be evaluated
bash4 iterate over both keys and values

[bash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[bash status] Expected 0, got 2

stdout:
stderr: 
bash: line 3: syntax error near unexpected token `v'
bash: line 3: `for k v ("${(@kv)assoc}"); do'
dash4 iterate over both keys and values

[dash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash4 iterate over both keys and values

[ash stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh4 iterate over both keys and values

[mksh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[mksh status] Expected 0, got 1

stdout:
stderr: 
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[3]: syntax error: 'v' unexpected
ksh4 iterate over both keys and values

[ksh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[1]: typeset: -A: unknown option
E: ksh: <stdin>[3]: syntax error: unexpected 'v'
toysh4 iterate over both keys and values

[toysh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: k1
sush4 iterate over both keys and values

[sush stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ': \n'
[sush status] Expected 0, got 2

stdout:
: 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: v
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: Unexpected token: done

brush4 iterate over both keys and values

[brush stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ': \n'
[brush status] Expected 0, got 2

stdout:
: 
stderr:
ERROR main: syntax error near token `v' (line 1 col 7)
ERROR main: syntax error near token `
' (line 1 col 5)
osh4 iterate over both keys and values

[osh stdout] Expected 'k1: v1\nk2: v2\nk3: v3\n', got ''
[osh status] Expected 0, got 2

stdout:
stderr: 
  for k v ("${(@kv)assoc}"); do
          ^
[ stdin ]:3: Unexpected word after for loop variable
bash5 get length

[bash stdout] Expected '3 2\n', got '0 2\n'

stdout:
0 2
stderr:
dash5 get length

[dash stdout] Expected '3 2\n', got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash5 get length

[ash stdout] Expected '3 2\n', got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh5 get length

[mksh stdout] Expected '3 2\n', got '2 2\n'

stdout:
2 2
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
ksh5 get length

[ksh stdout] Expected '3 2\n', got '2 2\n'

stdout:
2 2
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh5 get length

[toysh stdout] Expected '3 2\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: k1
sush5 get length

[sush stdout] Expected '3 2\n', got '2 0\n'

stdout:
2 0
stderr:
brush5 get length

[brush stdout] Expected '3 2\n', got '0 2\n'

stdout:
0 2
stderr:
osh5 get length

[osh stdout] Expected '3 2\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
  echo ${#assoc} ${#assoc[k1]}
                          ^~
[ stdin ]:3: fatal: Assoc array keys must be strings: $x 'x' "$x" etc. (OILS-ERR-101)
dash6 index by integer does not work

[dash stdout] Expected "['']\n", got ''
[dash status] Expected 0, got 2

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
ash6 index by integer does not work

[ash stdout] Expected "['']\n", got ''
[ash status] Expected 0, got 2

stdout:
stderr: 
ash: typeset: not found
ash: syntax error: unexpected "("
mksh6 index by integer does not work

[mksh stdout] Expected "['']\n", got "['v1']\n"

stdout:
['v1']
stderr:
mksh: <stdin>[1]: typeset: -A: unknown option
ksh6 index by integer does not work

[ksh stdout] Expected "['']\n", got "['v1']\n"

stdout:
['v1']
stderr:
E: ksh: <stdin>[1]: typeset: -A: unknown option
toysh6 index by integer does not work

[toysh stdout] Expected "['']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
sh: typeset: No such file or directory
main: line 2: sh: syntax error: k1
sush6 index by integer does not work

[sush stdout] Expected "['']\n", got "['v1']\n"

stdout:
['v1']
stderr: