Results for nameref.test.sh

statusoshosh_.pyosh_.cc
pass 222120
FAIL 345
total252525
caseoshosh_.pyosh_.ccdescription
0pass pass pass pass array by reference
1pass pass pass pass assoc array by reference
2pass pass pass pass local array by reference, relying on DYNAMIC SCOPING
3pass pass pass flag -n and +n
4pass pass pass mutating through -n
5FAIL FAIL FAIL flag -n combined ${!ref} -- bash INVERTS
detailsdetailsdetails
6pass pass pass named ref with $# doesn't work
7pass pass pass named ref with $# and shopt -s strict_nameref
8pass pass pass named ref with 1 $1 etc.
9pass pass pass assign to invalid ref
10pass pass pass assign to invalid ref with strict_nameref
11pass pass pass name ref on Undef cell
12pass pass pass assign to empty nameref and invalid nameref
13pass pass pass -n attribute before it has a value
14pass pass pass -n attribute on array is hard error, not a warning
15pass FAIL FAIL exported nameref
detailsdetails
16pass pass pass readonly nameref doesn't prevent assigning through it
17pass pass pass readonly var can't be assigned through nameref
18pass pass FAIL unset nameref
details
19pass pass pass Chain of namerefs
20pass pass pass Mutually recursive namerefs
21pass pass pass Dynamic scope with namerefs
22pass pass pass change reference itself
23FAIL FAIL FAIL a[2] in nameref
detailsdetailsdetails
24FAIL FAIL FAIL a[expr] in nameref -- DYNAMIC PARSING, don't want this
detailsdetailsdetails
63 passed, 0 OK, 0 not implemented, 0 BUG, 12 failed, 0 timeouts, 0 cases skipped
3 failed under osh

Details on runs that didn't PASS

osh5 flag -n combined ${!ref} -- bash INVERTS

[osh stdout] Expected 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=x\n', got 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=FOO\n'

stdout:
ref=x
!ref=foo
NOW A NAMEREF
ref=foo
!ref=FOO
stderr:
osh_.py5 flag -n combined ${!ref} -- bash INVERTS

[osh_.py stdout] Expected 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=x\n', got 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=FOO\n'

stdout:
ref=x
!ref=foo
NOW A NAMEREF
ref=foo
!ref=FOO
stderr:
osh_.cc5 flag -n combined ${!ref} -- bash INVERTS

[osh_.cc stdout] Expected 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=x\n', got 'ref=x\n!ref=foo\nNOW A NAMEREF\nref=foo\n!ref=FOO\n'

stdout:
ref=x
!ref=foo
NOW A NAMEREF
ref=foo
!ref=FOO
stderr:
osh_.py15 exported nameref

[osh_.py stdout] Expected 'None\nx\n---\nfoo\nx\n', got '(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[12 14 16])\n---\n(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[26 28 30])\n'

stdout:
(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[12 14 16])
---
(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[26 28 30])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc15 exported nameref

[osh_.cc stdout] Expected 'None\nx\n---\nfoo\nx\n', got '(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[12 14 16])\n---\n(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[26 28 30])\n'

stdout:
(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[12 14 16])
---
(cmd_value.Argv argv:[printenv.py x ref] arg_spids:[26 28 30])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc18 unset nameref

[osh_.cc stdout] Expected 'ref=X\nref=\nx=\n', got 'ref=X\nref=X\nx=X\n'

stdout:
ref=X
ref=X
x=X
stderr:
osh23 a[2] in nameref

[osh stdout] Expected 'ref=two\n', got 'ref=a[2]\n'

stdout:
ref=a[2]
stderr:
osh_.py23 a[2] in nameref

[osh_.py stdout] Expected 'ref=two\n', got 'ref=a[2]\n'

stdout:
ref=a[2]
stderr:
osh_.cc23 a[2] in nameref

[osh_.cc stdout] Expected 'ref=two\n', got 'ref=a[2]\n'

stdout:
ref=a[2]
stderr:
osh24 a[expr] in nameref -- DYNAMIC PARSING, don't want this

[osh stdout] Expected 'ref=three\n', got 'ref=a[$(echo 2) + 1]\n'

stdout:
ref=a[$(echo 2) + 1]
stderr:
osh_.py24 a[expr] in nameref -- DYNAMIC PARSING, don't want this

[osh_.py stdout] Expected 'ref=three\n', got 'ref=a[$(echo 2) + 1]\n'

stdout:
ref=a[$(echo 2) + 1]
stderr:
osh_.cc24 a[expr] in nameref -- DYNAMIC PARSING, don't want this

[osh_.cc stdout] Expected 'ref=three\n', got 'ref=a[$(echo 2) + 1]\n'

stdout:
ref=a[$(echo 2) + 1]
stderr: