Results for builtin-vars.test.sh

statusdashbashmkshzshosh
pass 1929222329
ok 72422
N-I 70552
BUG 02230
total3333333333
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 ok ok BUG pass Unset invalid variable name
detailsdetailsdetailsdetails
25pass pass pass pass pass Unset nonexistent variable
26pass pass pass pass pass Unset -v
27pass pass pass pass pass Unset -f
28N-I pass pass ok N-I Unset array member
detailsdetailsdetails
29N-I pass pass N-I N-I Unset array member with expression
detailsdetailsdetails
30pass pass pass BUG pass Use local twice
details
31ok pass pass BUG pass Local without variable is still unset!
detailsdetails
32ok BUG BUG pass pass local after readonly
detailsdetailsdetails
122 passed, 17 OK, 19 not implemented, 7 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

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

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

stdout:
X
X
stderr:
/home/andy/git/oilshell/oil/_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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: export: Illegal option -n
mksh2 export -n undefined is ignored

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: typeset: not found
/home/andy/git/oilshell/oil/_tmp/spec-bin/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: Can't export array
mksh14 can't export associative array

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: typeset: -A: unknown option
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: "foo": unexpected '"'
osh14 can't export associative array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Can't export array
dash15 assign to readonly variable

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: foo: is read only
bash15 assign to readonly variable

stdout:
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 2: foo: readonly variable
mksh15 assign to readonly variable

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[2]: read-only: foo
dash16 Make an existing local variable readonly

stdout:
local
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: eval: x: is read only
mksh16 Make an existing local variable readonly

stdout:
local
global
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: read-only: x
dash17 assign to readonly variable - errexit

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: foo: is read only
mksh17 assign to readonly variable - errexit

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[3]: read-only: foo
dash21 Unset readonly variable

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/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 invalid variable name

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: unset: %: bad variable name
bash24 Unset invalid variable name

stdout:
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/bash: line 1: unset: `%': not a valid identifier
mksh24 Unset invalid variable name

stdout:
status=1
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: read-only: %
zsh24 Unset invalid variable name

stdout:
status=0
stderr:
dash28 Unset array member

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: Syntax error: "(" unexpected
zsh28 Unset array member

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

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

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: Syntax error: "(" unexpected
zsh29 Unset array member with expression

stdout:
stderr: 
zsh: no matches found: a[i+1]
osh29 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 ]'
zsh30 Use local twice

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

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 4: foo: parameter not set
zsh31 Local without variable is still unset!

stdout:
[]
stderr:
dash32 local after readonly

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: local: y: is read only
bash32 local after readonly

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

stdout:
y=0
stderr: