Results for builtin-vars.test.sh

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

Details on runs that didn't PASS

osh_.py0 Export sets a global variable

[osh_.py stdout] Expected 'X\nX\n', got 'X\n'
[osh_.py status] Expected 0, got 127

stdout:
X
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
osh_.cc0 Export sets a global variable

[osh_.cc stdout] Expected 'X\nX\n', got 'X\n'
[osh_.cc status] Expected 0, got 127

stdout:
X
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
osh_.py1 Export sets a global variable that persists after export -n

[osh_.py stdout] Expected 'X\nX\nX\nNone\n', got 'X\nX\n'
[osh_.py status] Expected 0, got 127

stdout:
X
X
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.cc1 Export sets a global variable that persists after export -n

[osh_.cc stdout] Expected 'X\nX\nX\nNone\n', got 'X\nX\n'
[osh_.cc status] Expected 0, got 127

stdout:
X
X
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.py4 Export a global variable and unset it

[osh_.py stdout] Expected 'X\nX\ng=\nNone\n', got 'X\ng=\n'
[osh_.py status] Expected 0, got 127

stdout:
X
g=
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.cc4 Export a global variable and unset it

[osh_.cc stdout] Expected 'X\nX\ng=\nNone\n', got 'X\ng=\n'
[osh_.cc status] Expected 0, got 127

stdout:
X
g=
stderr:
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py GLOBAL
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.py5 Export existing global variables

[osh_.py stdout] Expected 'g1\ng2\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  printenv.py G1 G2
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
osh_.cc5 Export existing global variables

[osh_.cc stdout] Expected 'g1\ng2\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  printenv.py G1 G2
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
osh_.py6 Export existing local variable

[osh_.py stdout] Expected 'local1\nNone\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
    printenv.py L1
    ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py L1
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.cc6 Export existing local variable

[osh_.cc stdout] Expected 'local1\nNone\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
    printenv.py L1
    ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
  printenv.py L1
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
osh_.py7 Export a local that shadows a global

[osh_.py stdout] Expected 'local1\nNone\nglobal\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
    printenv.py V
    ^~~~~~~~~~~
[ stdin ]:5: 'printenv.py' not found
  printenv.py V  # exported local out of scope; global isn't exported yet
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
  printenv.py V  # now it's exported
  ^~~~~~~~~~~
[ stdin ]:10: 'printenv.py' not found
osh_.cc7 Export a local that shadows a global

[osh_.cc stdout] Expected 'local1\nNone\nglobal\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
    printenv.py V
    ^~~~~~~~~~~
[ stdin ]:5: 'printenv.py' not found
  printenv.py V  # exported local out of scope; global isn't exported yet
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
  printenv.py V  # now it's exported
  ^~~~~~~~~~~
[ stdin ]:10: 'printenv.py' not found
osh_.py8 Export a variable before defining it

[osh_.py stdout] Expected 'u\n', got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
osh_.cc8 Export a variable before defining it

[osh_.cc stdout] Expected 'u\n', got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
osh_.py9 Unset exported variable, then define it again. It's NOT still exported.

[osh_.py stdout] Expected 'u\nNone\nnewvalue\nNone\n', got 'newvalue\n'
[osh_.py status] Expected 0, got 127

stdout:
newvalue
stderr:
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:5: 'printenv.py' not found
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
osh_.cc9 Unset exported variable, then define it again. It's NOT still exported.

[osh_.cc stdout] Expected 'u\nNone\nnewvalue\nNone\n', got 'newvalue\n'
[osh_.cc status] Expected 0, got 127

stdout:
newvalue
stderr:
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:3: 'printenv.py' not found
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:5: 'printenv.py' not found
  printenv.py U
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
osh_.py10 Exporting a parent func variable (dynamic scope)

[osh_.py stdout] Expected 'before inner\nNone\ninner: X\nX\nafter inner\nX\n', got 'before inner\ninner: X\nafter inner\n'
[osh_.py status] Expected 0, got 127

stdout:
before inner
inner: X
after inner
stderr:
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:9: 'printenv.py' not found
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:12: 'printenv.py' not found
osh_.cc10 Exporting a parent func variable (dynamic scope)

[osh_.cc stdout] Expected 'before inner\nNone\ninner: X\nX\nafter inner\nX\n', got 'before inner\ninner: X\nafter inner\n'
[osh_.cc status] Expected 0, got 127

stdout:
before inner
inner: X
after inner
stderr:
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:9: 'printenv.py' not found
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
    printenv.py outer_var
    ^~~~~~~~~~~
[ stdin ]:12: 'printenv.py' not found
osh_.py11 Dependent export setting

[osh_.py stdout] Expected 'v=None\n', got 'v=\n'

stdout:
v=
stderr:
  export FOO=foo v=$(printenv.py FOO)
                     ^~~~~~~~~~~
[ stdin ]:1: 'printenv.py' not found
osh_.cc11 Dependent export setting

[osh_.cc stdout] Expected 'v=None\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/posix.h:106: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh13 can't export array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.py13 can't export array

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
osh_.cc13 can't export array

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

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

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

stdout:
stderr: 
  export a
  ^~~~~~
[ stdin ]:3: fatal: Only strings can be exported
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
osh_.py32 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
osh_.cc32 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
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_.py38 local after readonly

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

stdout:
y=0
y=
stderr:
osh_.cc38 local after readonly

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

stdout:
y=0
y=
stderr: