Results for assign-extended.test.sh

statusoshosh-cpp
pass 3232
ok 11
N-I 11
total3434
caseoshosh-cppdescription
0pass pass local -a
1pass pass declare -a
2N-I N-I indexed LHS with spaces (not allowed in OSH)
detailsdetails
3pass pass declare -f exit code indicates function existence
4pass pass declare -F prints function names
5pass pass declare -p var (exit status)
6pass pass declare
7pass pass declare -p
8pass pass declare -p var
9pass pass declare -p arr
10pass pass declare -p foo=bar doesn't make sense
11pass pass declare -pnrx
12pass pass declare -paA
13pass pass declare -pnrx var
14pass pass declare -pg
15pass pass declare -pg var
16pass pass ble.sh: eval -- "$(declare -p var arr)"
17pass pass eval -- "$(declare -p arr)" (restore arrays w/ unset elements)
18pass pass typeset -f
19pass pass typeset -p
20pass pass typeset -r makes a string readonly
21pass pass typeset -ar makes it readonly
22pass pass typeset -x makes it exported
23pass pass Multiple assignments / array assignments on a line
24pass pass Env bindings shouldn't contain array assignments
25pass pass syntax error in array assignment
26pass pass declare -g (bash-specific; bash-completion uses it)
27ok ok myvar=typeset (another form of dynamic assignment)
detailsdetails
28pass pass dynamic array parsing is not allowed
29pass pass dynamic flag in array in assign builtin
30pass pass typeset +x
31pass pass typeset +r removes read-only attribute (TODO: documented in bash to do nothing)
32pass pass function name with /
33pass pass invalid var name
64 passed, 2 OK, 2 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh2 indexed LHS with spaces (not allowed in OSH)

stdout:
status=127
[]
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found
osh-cpp2 indexed LHS with spaces (not allowed in OSH)

stdout:
status=127
[]
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found
osh27 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr:
osh-cpp27 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr: