Results for var-op-test.test.sh

statusoshosh-cpp
pass 3434
ok 33
total3737
caseoshosh-cppdescription
0pass pass Lazy Evaluation of Alternative
1pass pass Default value when empty
2pass pass Default value when unset
3ok ok Unquoted with array as default value
detailsdetails
4ok ok Quoted with array as default value
detailsdetails
5ok ok Assign default with array
detailsdetails
6pass pass Assign default value when empty
7pass pass Assign default value when unset
8pass pass ${v:+foo} Alternative value when empty
9pass pass ${v+foo} Alternative value when unset
10pass pass "${x+foo}" quoted (regression)
11pass pass ${s+foo} and ${s:+foo} when set -u
12pass pass "${array[@]} with set -u (bash is outlier)
13pass pass "${undefined[@]+foo}" and "${undefined[@]:+foo}", with set -u
14pass pass "${a[@]+foo}" and "${a[@]:+foo}" - operators are equivalent on arrays?
15pass pass Nix idiom ${!hooksSlice+"${!hooksSlice}"} - was workaround for obsolete bash 4.3 bug
16pass pass ${v-foo} and ${v:-foo} when set -u
17pass pass array and - and +
18pass pass $@ (empty) and - and +
19pass pass $@ ("") and - and +
20pass pass $@ ("" "") and - and +
21pass pass $* ("" "") and - and + (IFS=)
22pass pass "$*" ("" "") and - and + (IFS=)
23pass pass assoc array and - and +
24pass pass Error when empty
25pass pass Error when unset
26pass pass Error when unset
27pass pass ${var=x} dynamic scope
28pass pass array ${arr[0]=x}
29pass pass assoc array ${arr["k"]=x}
30pass pass "\z" as arg
31pass pass "\e" as arg
32pass pass op-test for ${a} and ${a[0]}
33pass pass op-test for ${a[@]} and ${a[*]}
34pass pass op-test for ${!array} with array="a" and array="a[0]"
35pass pass op-test for ${!array} with array="a[@]" or array="a[*]"
36pass pass op-test for unquoted ${a[*]:-empty} with IFS=
68 passed, 6 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh3 Unquoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1', '2', '3', '4xX']
stderr:
osh-cpp3 Unquoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1', '2', '3', '4xX']
stderr:
osh4 Quoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1 2 3 4xX']
stderr:
osh-cpp4 Quoted with array as default value

stdout:
['Xx1 2', '3 4xX']
['Xx1 2 3 4xX']
stderr:
osh5 Assign default with array

stdout:
['Xx1 2', '3 4xX']
['x1 2 3 4x']
stderr:
osh-cpp5 Assign default with array

stdout:
['Xx1 2', '3 4xX']
['x1 2 3 4x']
stderr: