Results for assign-extended.test.sh

statusoshosh_.pyosh_.cc
pass 323210
ok 111
N-I 110
FAIL 0023
total343434
caseoshosh_.pyosh_.ccdescription
0pass pass FAIL local -a
details
1pass pass FAIL declare -a
details
2N-I N-I FAIL indexed LHS with spaces (not allowed in OSH)
detailsdetailsdetails
3pass pass FAIL declare -f exit code indicates function existence
details
4pass pass pass declare -F prints function names
5pass pass FAIL declare -p var (exit status)
details
6pass pass FAIL declare
details
7pass pass FAIL declare -p
details
8pass pass FAIL declare -p var
details
9pass pass pass declare -p arr
10pass pass FAIL declare -p foo=bar doesn't make sense
details
11pass pass FAIL declare -pnrx
details
12pass pass FAIL declare -paA
details
13pass pass FAIL declare -pnrx var
details
14pass pass FAIL declare -pg
details
15pass pass FAIL declare -pg var
details
16pass pass FAIL ble.sh: eval -- "$(declare -p var arr)"
details
17pass pass FAIL eval -- "$(declare -p arr)" (restore arrays w/ unset elements)
details
18pass pass FAIL typeset -f
details
19pass pass FAIL typeset -p
details
20pass pass pass typeset -r makes a string readonly
21pass pass pass typeset -ar makes it readonly
22pass pass FAIL typeset -x makes it exported
details
23pass pass pass Multiple assignments / array assignments on a line
24pass pass pass Env bindings shouldn't contain array assignments
25pass pass pass syntax error in array assignment
26pass pass FAIL declare -g (bash-specific; bash-completion uses it)
details
27ok ok ok myvar=typeset (another form of dynamic assignment)
detailsdetailsdetails
28pass pass FAIL dynamic array parsing is not allowed
details
29pass pass FAIL dynamic flag in array in assign builtin
details
30pass pass FAIL typeset +x
details
31pass pass pass typeset +r removes read-only attribute (TODO: documented in bash to do nothing)
32pass pass pass function name with /
33pass pass pass invalid var name
74 passed, 3 OK, 2 not implemented, 0 BUG, 23 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.cc0 local -a

[osh_.cc status] Expected 0, got 255

stdout:
['x', 'y', 'z']
stderr:
dumb_alloc:
	gNumNew = 2087
	gNumDelete = 185
	gMemPos = 71264

	gNumMalloc = 113
	gNumFree = 0
	gMemPos2 = 10400
osh_.cc1 declare -a

[osh_.cc status] Expected 0, got 255

stdout:
['x', 'y', 'z']
stderr:
dumb_alloc:
	gNumNew = 1983
	gNumDelete = 166
	gMemPos = 68160

	gNumMalloc = 98
	gNumFree = 0
	gMemPos2 = 10160
osh2 indexed LHS with spaces (not allowed in OSH)

stdout:
status=127
[]
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found
osh_.py2 indexed LHS with spaces (not allowed in OSH)

stdout:
status=127
[]
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found
osh_.cc2 indexed LHS with spaces (not allowed in OSH)

[osh_.cc status] Expected 0, got 255

stdout:
status=127
[]
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found

dumb_alloc:
	gNumNew = 2234
	gNumDelete = 208
	gMemPos = 75344

	gNumMalloc = 226
	gNumFree = 0
	gMemPos2 = 12224
osh_.cc3 declare -f exit code indicates function existence

[osh_.cc stdout] Expected '1\n1\n0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:111: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc5 declare -p var (exit status)

[osh_.cc stdout] Expected '1\n1\n0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:111: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc6 declare

[osh_.cc stdout] Expected '[declare]\ntest_var1=111\ntest_var2=222\ntest_var3=333\ntest_var4=test_var1\ntest_var5=555\n[readonly]\ndeclare -r test_var2=222\n[export]\ndeclare -x test_var3=333\n[local]\ntest_var5=555\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc7 declare -p

[osh_.cc stdout] Expected '[declare]\ndeclare -- test_var1=111\ndeclare -r test_var2=222\ndeclare -x test_var3=333\ndeclare -n test_var4=test_var1\ndeclare -- test_var5=555\n[readonly]\ndeclare -r test_var2=222\n[export]\ndeclare -x test_var3=333\n[local]\ndeclare -- test_var5=555\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc8 declare -p var

[osh_.cc stdout] Expected '[declare]\ndeclare -- test_var1=111\ndeclare -r test_var2=222\ndeclare -x test_var3=333\ndeclare -n test_var4=test_var1\ndeclare -- test_var5=555\n[readonly]\ndeclare -r test_var2=222\n[export]\ndeclare -x test_var3=333\n[local]\ndeclare -- test_var5=555\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc10 declare -p foo=bar doesn't make sense

[osh_.cc stdout] Expected 'status=1\nstatus=1\ndeclare -- a=b\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:111: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc11 declare -pnrx

[osh_.cc stdout] Expected '[declare -pn]\ndeclare -n test_var4=test_var1\n[declare -pr]\ndeclare -r test_var2=222\n[declare -px]\ndeclare -x test_var3=333\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc12 declare -paA

[osh_.cc stdout] Expected '[declare -pa]\ndeclare -a test_var6=()\n[declare -pA]\ndeclare -A test_var7\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc13 declare -pnrx var

[osh_.cc stdout] Expected '[declare -pn]\ndeclare -n test_var4=test_var1\n[declare -pr]\ndeclare -r test_var2=222\n[declare -px]\ndeclare -x test_var3=333\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc14 declare -pg

[osh_.cc stdout] Expected 'declare -- test_var1=global\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc15 declare -pg var

[osh_.cc stdout] Expected 'declare -- test_var1=global\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc16 ble.sh: eval -- "$(declare -p var arr)"

[osh_.cc stdout] Expected 'sum=21\narr[0]=a2\narr[1]=a5\narr[2]=a8\narr[3]=a10\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc17 eval -- "$(declare -p arr)" (restore arrays w/ unset elements)

[osh_.cc stdout] Expected 'arr[0]: unset\narr[1]: unset\narr[2]: unset\narr[3]: set ... []\narr[4]: set ... [foo]\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:74: Tuple2<int, int> posix::pipe(): Assertion `0' failed.
osh_.cc18 typeset -f

[osh_.cc stdout] Expected '1\n1\n0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:111: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc19 typeset -p

[osh_.cc stdout] Expected '1\n1\n0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.opt: cpp/posix.h:111: void posix::dup2(int, int): Assertion `0' failed.
osh_.cc22 typeset -x makes it exported

[osh_.cc stdout] Expected 'lib/\n', got 'None\n'
[osh_.cc status] Expected 0, got 255

stdout:
None
stderr:
dumb_alloc:
	gNumNew = 1935
	gNumDelete = 152
	gMemPos = 67696

	gNumMalloc = 112
	gNumFree = 0
	gMemPos2 = 10416
osh_.cc26 declare -g (bash-specific; bash-completion uses it)

[osh_.cc stdout] Expected "['42', '']\n['bar', '']\n['ev2']\n", got "['bar', '']\n['42', '']\n['ev2']\n"
[osh_.cc status] Expected 0, got 255

stdout:
['bar', '']
['42', '']
['ev2']
stderr:
dumb_alloc:
	gNumNew = 3021
	gNumDelete = 375
	gMemPos = 101712

	gNumMalloc = 281
	gNumFree = 0
	gMemPos2 = 13088
osh27 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr:
osh_.py27 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr:
osh_.cc27 myvar=typeset (another form of dynamic assignment)

stdout:
a b
stderr:
dumb_alloc:
	gNumNew = 1954
	gNumDelete = 155
	gMemPos = 67152

	gNumMalloc = 81
	gNumFree = 0
	gMemPos2 = 9888
osh_.cc28 dynamic array parsing is not allowed

[osh_.cc status] Expected 0, got 255

stdout:
status=2
['']
stderr:
  typeset -a "$code"  # note: -a flag is required
             ^
[ stdin ]:2: 'typeset' Got -a but RHS isn't an array

dumb_alloc:
	gNumNew = 2093
	gNumDelete = 179
	gMemPos = 71216

	gNumMalloc = 144
	gNumFree = 0
	gMemPos2 = 10928
osh_.cc29 dynamic flag in array in assign builtin

[osh_.cc stdout] Expected 'foo=F\nbar=B\nF\nB\n', got 'foo=F\nbar=B\nNone\nNone\n'
[osh_.cc status] Expected 0, got 255

stdout:
foo=F
bar=B
None
None
stderr:
dumb_alloc:
	gNumNew = 2662
	gNumDelete = 283
	gMemPos = 87872

	gNumMalloc = 324
	gNumFree = 0
	gMemPos2 = 13808
osh_.cc30 typeset +x

[osh_.cc stdout] Expected 'E\nNone\n', got 'None\nNone\n'
[osh_.cc status] Expected 0, got 255

stdout:
None
None
stderr:
dumb_alloc:
	gNumNew = 2096
	gNumDelete = 188
	gMemPos = 71920

	gNumMalloc = 142
	gNumFree = 0
	gMemPos2 = 10896