Results for builtin-vars.test.sh

casedashbashmkshoshdescription
0pass pass pass pass Export sets a global variable
1N-I pass N-I pass Export sets a global variable that persists after export -n
detailsdetails
2N-I pass N-I pass export -n undefined is ignored
detailsdetails
3pass pass pass pass Export a global variable and unset it
4pass pass pass pass Export existing global variables
5pass pass pass pass Export existing local variable
6pass pass pass pass Export a local that shadows a global
7pass pass pass pass Export a variable before defining it
8pass pass pass pass Exporting a parent func variable (dynamic scope)
9pass pass pass pass Dependent export setting
10pass pass pass pass Exporting a variable doesn't change it
11ok BUG ok pass assign to readonly variable
detailsdetailsdetails
12ok pass ok pass assign to readonly variable - errexit
detailsdetails
13pass pass pass pass Unset a variable
14pass pass pass pass Unset exit status
15pass pass pass pass Unset nonexistent variable
16ok pass pass pass Unset readonly variable
details
17N-I pass N-I pass Unset a function without -f
detailsdetails
18pass pass pass pass Unset has dynamic scope
19pass pass pass pass Unset -v
20pass pass pass pass Unset -f
21N-I pass pass FAIL Unset array member
detailsdetails
22N-I pass pass FAIL Unset array member with expression
detailsdetails
23pass pass pass pass Use local twice
24ok pass pass pass Local without variable is still unset!
details

83 passed, 6 ok, 8 known unimplemented, 1 known bugs, 2 failed, 0 skipped

Details on runs that didn't PASS

dash1 Export sets a global variable that persists after export -n

stdout:
X
X
stderr:
_tmp/spec-bin/dash: 5: export: Illegal option -n
mksh1 Export sets a global variable that persists after export -n

stdout:
X
X
stderr:
_tmp/spec-bin/mksh: <stdin>[5]: export: -n: unknown option
dash2 export -n undefined is ignored

stdout:
stderr: 
_tmp/spec-bin/dash: 2: export: Illegal option -n
mksh2 export -n undefined is ignored

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[2]: export: -n: unknown option
dash11 assign to readonly variable

stdout:
stderr: 
_tmp/spec-bin/dash: 2: foo: is read only
bash11 assign to readonly variable

stdout:
status=1
stderr:
_tmp/spec-bin/bash: line 2: foo: readonly variable
mksh11 assign to readonly variable

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[2]: read-only: foo
dash12 assign to readonly variable - errexit

stdout:
stderr: 
_tmp/spec-bin/dash: 3: foo: is read only
mksh12 assign to readonly variable - errexit

stdout:
stderr: 
_tmp/spec-bin/mksh: <stdin>[3]: read-only: foo
dash16 Unset readonly variable

stdout:
stderr: 
_tmp/spec-bin/dash: 2: unset: R: is read only
dash17 Unset a function without -f

stdout:
foo
foo
stderr:
mksh17 Unset a function without -f

stdout:
foo
foo
stderr:
dash21 Unset array member

stdout:
stderr: 
_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
osh21 Unset array member

[osh stdout] Expected 'x z len=2\n', got 'x y z len=3\n'

stdout:
x y z len=3
stderr:
dash22 Unset array member with expression

stdout:
stderr: 
_tmp/spec-bin/dash: 2: Syntax error: "(" unexpected
osh22 Unset array member with expression

[osh stdout] Expected 'x z len=2\n', got 'w x y z len=4\n'

stdout:
w x y z len=4
stderr:
dash24 Local without variable is still unset!

stdout:
stderr: 
_tmp/spec-bin/dash: 4: foo: parameter not set