Results for builtin-vars.test.sh

statusdashbashmkshzshosh
pass 1936252537
ok 93443
N-I 130880
BUG 02440
FAIL 00001
total4141414141
casedashbashmkshzshoshdescription
0pass pass pass pass pass Export sets a global variable
1N-I pass N-I N-I pass Export sets a global variable that persists after export -n
detailsdetailsdetails
2N-I pass N-I N-I pass export -n undefined is ignored
detailsdetailsdetails
3N-I ok N-I N-I pass export -n foo=bar not allowed
detailsdetailsdetailsdetails
4pass pass pass pass pass Export a global variable and unset it
5pass pass pass pass pass Export existing global variables
6pass pass pass pass pass Export existing local variable
7pass pass pass pass pass Export a local that shadows a global
8pass pass pass pass pass Export a variable before defining it
9pass pass pass pass pass Unset exported variable, then define it again. It's NOT still exported.
10pass pass pass pass pass Exporting a parent func variable (dynamic scope)
11pass pass pass pass pass Dependent export setting
12pass pass pass pass pass Exporting a variable doesn't change it
13N-I pass BUG pass ok can't export array
detailsdetailsdetails
14pass pass N-I pass ok can't export associative array
detailsdetails
15ok BUG ok pass pass assign to readonly variable
detailsdetailsdetails
16ok pass ok pass pass Make an existing local variable readonly
detailsdetails
17ok pass ok pass pass assign to readonly variable - errexit
detailsdetails
18pass pass pass pass pass Unset a variable
19pass pass pass pass pass Unset exit status
20pass pass pass pass pass Unset nonexistent variable
21ok pass pass ok pass Unset readonly variable
detailsdetails
22N-I pass N-I N-I pass Unset a function without -f
detailsdetailsdetails
23pass pass pass pass pass Unset has dynamic scope
24ok pass pass ok pass Unset and scope (bug #653)
detailsdetails
25ok ok pass ok pass unset of local reveals variable in higher scope
detailsdetailsdetails
26ok ok ok BUG pass Unset invalid variable name
detailsdetailsdetailsdetails
27pass pass pass pass pass Unset nonexistent variable
28pass pass pass pass pass Unset -v
29pass pass pass pass pass Unset -f
30N-I pass pass ok pass Unset array member
detailsdetails
31N-I pass pass pass pass Unset errors
details
32N-I pass N-I BUG ok Unset wrong type
detailsdetailsdetailsdetails
33N-I pass N-I N-I pass unset -v assoc (related to issue #661)
detailsdetailsdetails
34N-I pass N-I pass pass unset assoc errors
detailsdetails
35N-I pass pass N-I pass Unset array member with dynamic parsing
detailsdetails
36pass pass pass BUG pass Use local twice
details
37ok pass pass BUG pass Local without variable is still unset!
detailsdetails
38ok BUG BUG pass FAIL local after readonly
detailsdetailsdetailsdetails
39N-I pass BUG N-I pass unset a[-1] (bf.bash regression)
detailsdetailsdetails
40N-I pass BUG N-I pass unset a[-1] in sparse array (bf.bash regression)
detailsdetailsdetails
142 passed, 23 OK, 29 not implemented, 10 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

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

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

stdout:
X
X
stderr:
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: 
dash: 2: export: Illegal option -n
mksh2 export -n undefined is ignored

stdout:
stderr: 
mksh: <stdin>[2]: export: -n: unknown option
zsh2 export -n undefined is ignored

stdout:
stderr: 
zsh: bad option: -n
dash3 export -n foo=bar not allowed

stdout:
stderr: 
dash: 2: export: Illegal option -n
bash3 export -n foo=bar not allowed

stdout:
status=0
new
stderr:
mksh3 export -n foo=bar not allowed

stdout:
stderr: 
mksh: <stdin>[2]: export: -n: unknown option
zsh3 export -n foo=bar not allowed

stdout:
status=1
old
stderr:
zsh: bad option: -n
dash13 can't export array

stdout:
stderr: 
dash: 1: typeset: not found
dash: 2: Syntax error: "(" unexpected
mksh13 can't export array

stdout:
1
stderr:
osh13 can't export array

stdout:
stderr: 
  export a
         ^
[ stdin ]:3: fatal: Only strings can be exported
mksh14 can't export associative array

stdout:
stderr: 
mksh: <stdin>[1]: typeset: -A: unknown option
mksh: <stdin>[2]: "foo": unexpected '"'
osh14 can't export associative array

stdout:
stderr: 
  export a
         ^
[ stdin ]:3: fatal: Only strings can be exported
dash15 assign to readonly variable

stdout:
stderr: 
dash: 2: foo: is read only
bash15 assign to readonly variable

stdout:
status=1
stderr:
bash: line 2: foo: readonly variable
mksh15 assign to readonly variable

stdout:
stderr: 
mksh: <stdin>[2]: read-only: foo
dash16 Make an existing local variable readonly

stdout:
local
stderr:
dash: 1: eval: x: is read only
mksh16 Make an existing local variable readonly

stdout:
local
global
stderr:
mksh: read-only: x
dash17 assign to readonly variable - errexit

stdout:
stderr: 
dash: 3: foo: is read only
mksh17 assign to readonly variable - errexit

stdout:
stderr: 
mksh: <stdin>[3]: read-only: foo
dash21 Unset readonly variable

stdout:
stderr: 
dash: 2: unset: R: is read only
zsh21 Unset readonly variable

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

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

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

stdout:
foo
foo
stderr:
dash24 Unset and scope (bug #653)

stdout:
level2=yy
level2=
level1=xx
level1=
level2=yy
level2=
stderr:
zsh24 Unset and scope (bug #653)

stdout:
level2=yy
level2=
level1=xx
level1=
level2=yy
level2=
stderr:
dash25 unset of local reveals variable in higher scope

stdout:
x=foo
x=
stderr:
bash25 unset of local reveals variable in higher scope

stdout:
x=foo
x=
stderr:
zsh25 unset of local reveals variable in higher scope

stdout:
x=foo
x=
stderr:
dash26 Unset invalid variable name

stdout:
stderr: 
dash: 1: unset: %: bad variable name
bash26 Unset invalid variable name

stdout:
status=1
stderr:
bash: line 1: unset: `%': not a valid identifier
mksh26 Unset invalid variable name

stdout:
status=1
stderr:
mksh: <stdin>[1]: read-only: %
zsh26 Unset invalid variable name

stdout:
status=0
stderr:
dash30 Unset array member

stdout:
stderr: 
dash: 1: Syntax error: "(" unexpected
zsh30 Unset array member

stdout:
status=0
 y z len=3
stderr:
dash31 Unset errors

stdout:
status=0
stderr:
dash: 4: Syntax error: "(" unexpected
dash32 Unset wrong type

stdout:
stderr: 
dash: 3: declare: not found
dash: 4: unset: undef[1]: bad variable name
mksh32 Unset wrong type

stdout:
stderr: 
zsh32 Unset wrong type

stdout:
undef 0
undef 1
array 0
array 1
assoc 0
assoc 0
stderr:
zsh: bad math expression: operand expected at `"key"'
zsh: bad math expression: operand expected at `"key"'
zsh: no matches found: [key]=val
osh32 Unset wrong type

stdout:
undef 1
undef 1
array 0
array 0
assoc 0
assoc 0
stderr:
  unset -v 'undef[1]'
           ^
[ stdin ]:4: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:6: 'undef' isn't an array
dash33 unset -v assoc (related to issue #661)

stdout:
stderr: 
mksh33 unset -v assoc (related to issue #661)

stdout:
stderr: 
zsh33 unset -v assoc (related to issue #661)

stdout:
stderr: 
dash34 unset assoc errors

stdout:
stderr: 
mksh34 unset assoc errors

stdout:
stderr: 
dash35 Unset array member with dynamic parsing

stdout:
stderr: 
dash: 2: Syntax error: "(" unexpected
zsh35 Unset array member with dynamic parsing

stdout:
stderr: 
zsh: no matches found: a[i+1]
zsh36 Use local twice

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

stdout:
stderr: 
dash: 4: foo: parameter not set
zsh37 Local without variable is still unset!

stdout:
[]
stderr:
dash38 local after readonly

stdout:
stderr: 
dash: 3: local: y: is read only
bash38 local after readonly

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

stdout:
y=0
y=
stderr:
osh38 local after readonly

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

stdout:
y=0
y=
stderr:
dash39 unset a[-1] (bf.bash regression)

stdout:
stderr: 
mksh39 unset a[-1] (bf.bash regression)

stdout:
len=3
last=
last=0
1 2 3 42
stderr:
zsh39 unset a[-1] (bf.bash regression)

stdout:
stderr: 
dash40 unset a[-1] in sparse array (bf.bash regression)

stdout:
stderr: 
mksh40 unset a[-1] in sparse array (bf.bash regression)

stdout:
len=3 a=0 2 3
last= second= third=
---
len=2 a=0 2
last= second= third=
stderr:
zsh40 unset a[-1] in sparse array (bf.bash regression)

stdout:
stderr: