Results for builtin-vars.test.sh

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

132 passed, 12 ok, 16 known unimplemented, 6 known bugs, 1 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
zsh1 Export sets a global variable that persists after export -n

stdout:
X
X
X
X
stderr:
zsh: bad option: -n
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
zsh2 export -n undefined is ignored

stdout:
stderr: 
zsh: bad option: -n
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
zsh16 Unset readonly variable

stdout:
stderr: 
zsh: read-only variable: R
dash17 Unset a function without -f

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

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

stdout:
foo
foo
stderr:
dash19 Unset invalid variable name

stdout:
stderr: 
_tmp/spec-bin/dash: 1: unset: %: bad variable name
bash19 Unset invalid variable name

stdout:
status=1
stderr:
_tmp/spec-bin/bash: line 1: unset: `%': not a valid identifier
mksh19 Unset invalid variable name

stdout:
status=1
stderr:
_tmp/spec-bin/mksh: <stdin>[1]: read-only: %
zsh19 Unset invalid variable name

stdout:
status=0
stderr:
dash23 Unset array member

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

stdout:
status=0
 y z len=3
stderr:
osh23 Unset array member

stdout:
status=2
x y z len=3
stderr:
  unset 'a[1]'
        ^
[ stdin ]:2: 'unset' got invalid variable name 'a[1]'
osh_ALT23 Unset array member

stdout:
status=2
x y z len=3
stderr:
  unset 'a[1]'
        ^
[ stdin ]:2: 'unset' got invalid variable name 'a[1]'
dash24 Unset array member with expression

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

stdout:
stderr: 
zsh: no matches found: a[i+1]
osh24 Unset array member with expression

stdout:
status=2
w x y z len=4
stderr:
  unset 'a[ i - 1 ]' a[i+1]  # note: can't have space between a and [
        ^
[ stdin ]:3: 'unset' got invalid variable name 'a[ i - 1 ]'
osh_ALT24 Unset array member with expression

stdout:
status=2
w x y z len=4
stderr:
  unset 'a[ i - 1 ]' a[i+1]  # note: can't have space between a and [
        ^
[ stdin ]:3: 'unset' got invalid variable name 'a[ i - 1 ]'
zsh25 Use local twice

stdout:
foo=bar
bar
stderr:
dash26 Local without variable is still unset!

stdout:
stderr: 
_tmp/spec-bin/dash: 4: foo: parameter not set
zsh26 Local without variable is still unset!

stdout:
[]
stderr:
dash27 local after readonly

stdout:
stderr: 
_tmp/spec-bin/dash: 3: local: y: is read only
bash27 local after readonly

stdout:
y=
stderr:
main: line 3: local: y: readonly variable
mksh27 local after readonly

stdout:
y=0
stderr:
osh27 local after readonly

[osh stdout] Expected u'', got 'y=1\n'
[osh status] Expected 1, got 0

stdout:
y=1
stderr:
osh_ALT27 local after readonly

[osh_ALT stdout] Expected u'', got 'y=1\n'
[osh_ALT status] Expected 1, got 0

stdout:
y=1
stderr: