Results for assign-extended.test.sh

statusoshosh_.pyosh_.cc
pass 322510
ok 111
N-I 100
FAIL 0823
total343434
caseoshosh_.pyosh_.ccdescription
0pass FAIL FAIL local -a
detailsdetails
1pass FAIL FAIL declare -a
detailsdetails
2N-I FAIL 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 FAIL FAIL typeset -x makes it exported
detailsdetails
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 FAIL FAIL declare -g (bash-specific; bash-completion uses it)
detailsdetails
27ok ok ok myvar=typeset (another form of dynamic assignment)
detailsdetailsdetails
28pass FAIL FAIL dynamic array parsing is not allowed
detailsdetails
29pass FAIL FAIL dynamic flag in array in assign builtin
detailsdetails
30pass FAIL FAIL typeset +x
detailsdetails
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
67 passed, 3 OK, 1 not implemented, 0 BUG, 31 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh_.py0 local -a

[osh_.py stdout] Expected "['x', 'y', 'z']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${array[@]}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.cc0 local -a

[osh_.cc stdout] Expected "['x', 'y', 'z']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
    argv.py "${array[@]}"
    ^~~~~~~
[ stdin ]:3: 'argv.py' not found
osh_.py1 declare -a

[osh_.py stdout] Expected "['x', 'y', 'z']\n", got ''
[osh_.py status] Expected 0, got 127

stdout:
stderr: 
  argv.py "${array[@]}"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
osh_.cc1 declare -a

[osh_.cc stdout] Expected "['x', 'y', 'z']\n", got ''
[osh_.cc status] Expected 0, got 127

stdout:
stderr: 
  argv.py "${array[@]}"
  ^~~~~~~
[ stdin ]:2: 'argv.py' not found
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)

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

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

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

stdout:
status=127
stderr:
  a[1 * 1]=x a[ 1 + 2 ]=z
  ^~
[ stdin ]:1: 'a[1' not found
  argv.py "${a[@]}"
  ^~~~~~~
[ stdin ]:3: 'argv.py' not found
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.dbg: cpp/posix.h:143: 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.dbg: cpp/posix.h:143: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:143: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:106: 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.dbg: cpp/posix.h:143: 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.dbg: cpp/posix.h:143: void posix::dup2(int, int): Assertion `0' failed.
osh_.py22 typeset -x makes it exported

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

stdout:
stderr: 
  printenv.py PYTHONPATH
  ^~~~~~~~~~~
[ stdin ]:2: 'printenv.py' not found
osh_.cc22 typeset -x makes it exported

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

stdout:
stderr: 
  printenv.py PYTHONPATH
  ^~~~~~~~~~~
[ stdin ]:2: 'printenv.py' not found
osh_.py26 declare -g (bash-specific; bash-completion uses it)

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

stdout:
stderr: 
  argv.py "$G" "$L"
  ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  argv.py "${dict["foo"]}" "${localdict["spam"]}"
  ^~~~~~~
[ stdin ]:13: 'argv.py' not found
  argv.py "${ev["ev1"]}"
  ^~~~~~~
[ stdin ]:14: 'argv.py' not found
osh_.cc26 declare -g (bash-specific; bash-completion uses it)

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

stdout:
stderr: 
  argv.py "$G" "$L"
  ^~~~~~~
[ stdin ]:12: 'argv.py' not found
  argv.py "${dict["foo"]}" "${localdict["spam"]}"
  ^~~~~~~
[ stdin ]:13: 'argv.py' not found
  argv.py "${ev["ev1"]}"
  ^~~~~~~
[ stdin ]:14: 'argv.py' not found
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:
osh_.py28 dynamic array parsing is not allowed

[osh_.py stdout] Expected "status=2\n['']\n", got 'status=2\n'
[osh_.py status] Expected 0, got 127

stdout:
status=2
stderr:
  typeset -a "$code"  # note: -a flag is required
             ^
[ stdin ]:2: 'typeset' Got -a but RHS isn't an array
  argv.py "$x"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
osh_.cc28 dynamic array parsing is not allowed

[osh_.cc stdout] Expected "status=2\n['']\n", got 'status=2\n'
[osh_.cc status] Expected 0, got 127

stdout:
status=2
stderr:
  typeset -a "$code"  # note: -a flag is required
             ^
[ stdin ]:2: 'typeset' Got -a but RHS isn't an array
  argv.py "$x"
  ^~~~~~~
[ stdin ]:4: 'argv.py' not found
osh_.py29 dynamic flag in array in assign builtin

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

stdout:
foo=F
bar=B
stderr:
  printenv.py foo
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
  printenv.py bar
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
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\n'
[osh_.cc status] Expected 0, got 127

stdout:
foo=F
bar=B
stderr:
  printenv.py foo
  ^~~~~~~~~~~
[ stdin ]:7: 'printenv.py' not found
  printenv.py bar
  ^~~~~~~~~~~
[ stdin ]:8: 'printenv.py' not found
osh_.py30 typeset +x

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

stdout:
stderr: 
  printenv.py e
  ^~~~~~~~~~~
[ stdin ]:2: 'printenv.py' not found
  printenv.py e  # no longer exported
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found
osh_.cc30 typeset +x

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

stdout:
stderr: 
  printenv.py e
  ^~~~~~~~~~~
[ stdin ]:2: 'printenv.py' not found
  printenv.py e  # no longer exported
  ^~~~~~~~~~~
[ stdin ]:4: 'printenv.py' not found