Results for builtin-vars.test.sh

statusdashbashmkshzshoshosh_ALT
pass 193625253737
ok 934433
N-I 1308800
BUG 024400
FAIL 000011
total414141414141
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
3N-I ok N-I N-I pass pass export -n foo=bar not allowed
detailsdetailsdetailsdetails
4pass pass pass pass pass pass Export a global variable and unset it
5pass pass pass pass pass pass Export existing global variables
6pass pass pass pass pass pass Export existing local variable
7pass pass pass pass pass pass Export a local that shadows a global
8pass pass pass pass pass pass Export a variable before defining it
9pass pass pass pass pass pass Unset exported variable, then define it again. It's NOT still exported.
10pass pass pass pass pass pass Exporting a parent func variable (dynamic scope)
11pass pass pass pass pass pass Dependent export setting
12pass pass pass pass pass pass Exporting a variable doesn't change it
13N-I pass BUG pass ok ok can't export array
detailsdetailsdetailsdetails
14pass pass N-I pass ok ok can't export associative array
detailsdetailsdetails
15ok BUG ok pass pass pass assign to readonly variable
detailsdetailsdetails
16ok pass ok pass pass pass Make an existing local variable readonly
detailsdetails
17ok pass ok pass pass pass assign to readonly variable - errexit
detailsdetails
18pass pass pass pass pass pass Unset a variable
19pass pass pass pass pass pass Unset exit status
20pass pass pass pass pass pass Unset nonexistent variable
21ok pass pass ok pass pass Unset readonly variable
detailsdetails
22N-I pass N-I N-I pass pass Unset a function without -f
detailsdetailsdetails
23pass pass pass pass pass pass Unset has dynamic scope
24ok pass pass ok pass pass Unset and scope (bug #653)
detailsdetails
25ok ok pass ok pass pass unset of local reveals variable in higher scope
detailsdetailsdetails
26ok ok ok BUG pass pass Unset invalid variable name
detailsdetailsdetailsdetails
27pass pass pass pass pass pass Unset nonexistent variable
28pass pass pass pass pass pass Unset -v
29pass pass pass pass pass pass Unset -f
30N-I pass pass ok pass pass Unset array member
detailsdetails
31N-I pass pass pass pass pass Unset errors
details
32N-I pass N-I BUG ok ok Unset wrong type
detailsdetailsdetailsdetailsdetails
33N-I pass N-I N-I pass pass unset -v assoc (related to issue #661)
detailsdetailsdetails
34N-I pass N-I pass pass pass unset assoc errors
detailsdetails
35N-I pass pass N-I pass pass Unset array member with dynamic parsing
detailsdetails
36pass pass pass BUG pass pass Use local twice
details
37ok pass pass BUG pass pass Local without variable is still unset!
detailsdetails
38ok BUG BUG pass FAIL FAIL local after readonly
detailsdetailsdetailsdetailsdetails
39N-I pass BUG N-I pass pass unset a[-1] (bf.bash regression)
detailsdetailsdetails
40N-I pass BUG N-I pass pass unset a[-1] in sparse array (bf.bash regression)
detailsdetailsdetails
179 passed, 26 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
osh_ALT13 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
osh_ALT14 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: shopt: not found
dash: 3: Syntax error: "(" unexpected
zsh30 Unset array member

stdout:
status=0
 y z len=3
stderr:
zsh: command not found: shopt
dash31 Unset errors

stdout:
status=0
stderr:
dash: 1: shopt: not found
dash: 6: Syntax error: "(" unexpected
dash32 Unset wrong type

stdout:
stderr: 
dash: 3: shopt: not found
dash: 5: declare: not found
dash: 6: 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: command not found: shopt
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 ]:6: 'undef' isn't an array
  unset -v 'undef["key"]'
           ^
[ stdin ]:8: 'undef' isn't an array
osh_ALT32 Unset wrong type

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

stdout:
stderr: 
dash: 1: shopt: not found
mksh33 unset -v assoc (related to issue #661)

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
zsh33 unset -v assoc (related to issue #661)

stdout:
stderr: 
zsh: command not found: shopt
dash34 unset assoc errors

stdout:
stderr: 
dash: 1: shopt: not found
mksh34 unset assoc errors

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
dash35 Unset array member with dynamic parsing

stdout:
stderr: 
dash: 1: shopt: not found
dash: 4: Syntax error: "(" unexpected
zsh35 Unset array member with dynamic parsing

stdout:
stderr: 
zsh: command not found: shopt
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:
osh_ALT38 local after readonly

[osh_ALT stdout] Expected u'', got 'y=0\ny=\n'
[osh_ALT 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:
mksh: <stdin>[3]: shopt: not found
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:
mksh: <stdin>[3]: shopt: not found
zsh40 unset a[-1] in sparse array (bf.bash regression)

stdout:
stderr: