Results for assign-extended.test.sh

statusbashmkshosh
pass 14718
ok 551
N-I 071
BUG 110
total202020
casebashmkshoshdescription
0pass N-I pass local -a
details
1pass N-I pass declare -a
details
2pass pass N-I indexed LHS with spaces (not allowed in OSH)
details
3pass N-I pass declare -f exit code indicates function existence
details
4pass N-I pass declare -F prints function names
details
5pass N-I pass declare -p
details
6pass pass pass typeset -f
7pass BUG pass typeset -p
details
8ok ok pass typeset -r makes a string readonly
detailsdetails
9ok N-I pass typeset -ar makes it readonly
detailsdetails
10pass pass pass typeset -x makes it exported
11pass pass pass Multiple assignments / array assignments on a line
12ok ok pass Env bindings shouldn't contain array assignments
detailsdetails
13BUG ok pass syntax error in array assignment
detailsdetails
14pass N-I pass declare -g (bash-specific; bash-completion uses it)
details
15pass pass ok myvar=typeset (another form of dynamic assignment)
details
16ok ok pass dynamic array parsing is not allowed
detailsdetails
17pass pass pass dynamic flag in array in assign builtin
18pass pass pass typeset +x
19ok ok pass typeset +r removes read-only attribute
detailsdetails
39 passed, 11 OK, 8 not implemented, 2 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

mksh0 local -a

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: syntax error: '(' unexpected
mksh1 declare -a

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected
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
mksh3 declare -f exit code indicates function existence

stdout:
127
127
127
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[5]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[8]: declare: not found
mksh4 declare -F prints function names

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[6]: declare: not found
mksh5 declare -p

stdout:
127
127
127
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[5]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[8]: declare: not found
mksh7 typeset -p

stdout:
0
0
0
stderr:
bash8 typeset -r makes a string readonly

stdout:
status=1
status=1
status=1
status=1
status=1
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 3: s1: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 5: s2: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 7: s1: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 9: s2: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 11: unset: s1: cannot unset: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 13: unset: s2: cannot unset: readonly variable
mksh8 typeset -r makes a string readonly

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[3]: read-only: s1
bash9 typeset -ar makes it readonly

stdout:
status=1
status=1
status=1
status=1
status=1
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 3: array1: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 5: array2: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 7: array1: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 9: array2: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 11: unset: array1: cannot unset: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 13: unset: array2: cannot unset: readonly variable
mksh9 typeset -ar makes it readonly

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: syntax error: '(' unexpected
bash12 Env bindings shouldn't contain array assignments

stdout:
1
None
3
stderr:
mksh12 Env bindings shouldn't contain array assignments

stdout:
1
2
3
stderr:
bash13 syntax error in array assignment

stdout:
x
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 1: 0+: syntax error: operand expected (error token is "+")
mksh13 syntax error in array assignment

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: 0+: unexpected 'end of expression'
mksh14 declare -g (bash-specific; bash-completion uses it)

stdout:
['', '']
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[11]: declare: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[11]: "foo": unexpected '"'
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[13]: "foo": unexpected '"'
osh15 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr:
bash16 dynamic array parsing is not allowed

stdout:
status=0
['1']
stderr:
mksh16 dynamic array parsing is not allowed

stdout:
status=0
['(1 2 3)']
stderr:
bash19 typeset +r removes read-only attribute

stdout:
r=r1
r=r1
r=r1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 3: typeset: r: readonly variable
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 5: r: readonly variable
mksh19 typeset +r removes read-only attribute

stdout:
r=r1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[3]: read-only: r