spec test index / oilshell.org
38 passed, 0 OK, 0 not implemented, 0 BUG, 37 failed, 0 timeouts, 0 cases skipped 3 failed under osh
osh_.cc | 0 pass array by reference [osh_.cc stdout] Expected 'zo\n', got '' [osh_.cc status] Expected 0, got 1 stdout: stderr: echo "${array_name[$idx]}" ^~~~ [ stdin ]:4: fatal: Can't index string 'array_name' with integer |
osh_.cc | 1 pass assoc array by reference [osh_.cc stdout] Expected 'jam\n', got '' [osh_.cc status] Expected 0, got 1 stdout: stderr: echo "${array_name[$idx]}" ^~~~ [ stdin ]:4: fatal: Can't index string 'array_name' with integer |
osh_.cc | 2 pass local array by reference, relying on DYNAMIC SCOPING [osh_.cc stdout] Expected 'zo\n', got '' [osh_.cc status] Expected 0, got 1 stdout: stderr: echo "${array_name[$idx]}" ^~~~ [ stdin ]:4: fatal: Can't index string 'array_name' with integer |
osh_.cc | 3 flag -n and +n [osh_.cc stdout] Expected 'ref=x\nref=foo\nref=bar\nref=x\n', got 'ref=x\nref=x\nref=x\nref=x\n' stdout: ref=x ref=x ref=x ref=xstderr: |
osh_.cc | 4 mutating through -n [osh_.cc stdout] Expected '1 ref=y\n2 ref=YY\n3 ref=XXXX\n4 y=XXXX\n', got '1 ref=y\n2 ref=y\n3 ref=XXXX\n4 y=YY\n' stdout: 1 ref=y 2 ref=y 3 ref=XXXX 4 y=YYstderr: |
osh | 5 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=FOOstderr: |
osh_.py | 5 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=FOOstderr: |
osh_.cc | 5 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=x\n!ref=foo\n' stdout: ref=x !ref=foo NOW A NAMEREF ref=x !ref=foostderr: |
osh_.py | 6 named ref with $# doesn't work [osh_.py stdout] Expected 'ref=#\nref=#\n', got 'ref=#\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: ref=#stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.py | 7 named ref with $# and shopt -s strict_nameref [osh_.py stderr] Found 'Traceback (most recent' stdout: ref=#stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 7 named ref with $# and shopt -s strict_nameref [osh_.cc stdout] Expected 'ref=#\n', got 'ref=#\nref=#\n' [osh_.cc status] Expected 1, got 0 stdout: ref=# ref=#stderr: |
osh_.py | 8 named ref with 1 $1 etc. [osh_.py stdout] Expected 'ref=1\nref=1\nref2=$1\nref2=$1\nref3=x\nref3=foo\n', got 'ref=1\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: ref=1stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 8 named ref with 1 $1 etc. [osh_.cc stdout] Expected 'ref=1\nref=1\nref2=$1\nref2=$1\nref3=x\nref3=foo\n', got 'ref=1\nref=1\nref2=$1\nref2=$1\nref3=x\nref3=x\n' stdout: ref=1 ref=1 ref2=$1 ref2=$1 ref3=x ref3=xstderr: set 5 |
osh_.py | 9 assign to invalid ref [osh_.py stdout] Expected 'ref=1\nref=1\nref=foo\n', got 'ref=1\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: ref=1stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.py | 10 assign to invalid ref with strict_nameref [osh_.py stderr] Found 'Traceback (most recent' stdout: ref=1stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 10 assign to invalid ref with strict_nameref [osh_.cc stdout] Expected 'ref=1\n', got 'ref=1\nref=1\nref=foo\n' [osh_.cc status] Expected 1, got 0 stdout: ref=1 ref=1 ref=foostderr: |
osh_.py | 11 name ref on Undef cell [osh_.py stdout] Expected 'ref=\nnounset\n', got '' [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1038, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.py | 12 assign to empty nameref and invalid nameref [osh_.py stdout] Expected 'ref=\nref=\nref2=\nref2=x\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1038, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 12 assign to empty nameref and invalid nameref [osh_.cc stdout] Expected 'ref=\nref=\nref2=\nref2=x\n', got 'ref=\nref=x\nref2=undef\nref2=x\n' stdout: ref= ref=x ref2=undef ref2=xstderr: |
osh_.py | 13 -n attribute before it has a value [osh_.py stdout] Expected 'ref=\nref=XX\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1038, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 13 -n attribute before it has a value [osh_.cc stdout] Expected 'ref=\nref=XX\n', got 'ref=\nref=x\n' stdout: ref= ref=xstderr: |
osh_.py | 14 -n attribute on array is hard error, not a warning [osh_.py stderr] Found 'Traceback (most recent' stdout: histderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 848, in _Dispatch self.mem.SetVar(lval, val, lookup_mode, flags=flags) File "/home/andy/git/oilshell/oil/core/state.py", line 1172, in SetVar cell, name_map, cell_name = self._ResolveNameOrRef(lval.name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1038, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.py | 15 exported nameref [osh_.py stdout] Expected 'None\nx\n---\nfoo\nx\n', got 'None\nNone\n---\nNone\nNone\n' stdout: None None --- None Nonestderr: |
osh_.cc | 15 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_.cc | 16 readonly nameref doesn't prevent assigning through it [osh_.cc stdout] Expected 'ref=XX\nref=XXXX\nx=X\n', got 'ref=x\nref=XXXX\nx=X\n' stdout: ref=x ref=XXXX x=Xstderr: |
osh_.cc | 17 readonly var can't be assigned through nameref [osh_.cc stdout] Expected 'ref=X\nref=XX\n', got 'ref=x\nref=XX\nref=XXX\nx=X\n' [osh_.cc status] Expected 1, got 0 stdout: ref=x ref=XX ref=XXX x=Xstderr: |
osh_.cc | 18 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=Xstderr: |
osh_.cc | 19 Chain of namerefs [osh_.cc stdout] Expected 'ref_to_ref=foo\nref=foo\n', got 'ref_to_ref=ref\nref=x\n' stdout: ref_to_ref=ref ref=xstderr: |
osh_.cc | 20 Mutually recursive namerefs [osh_.cc stdout] Expected u'', got 'defined\nref1=ref2\nref2=ref2\n' [osh_.cc status] Expected 1, got 0 stdout: defined ref1=ref2 ref2=ref2stderr: |
osh_.cc | 21 Dynamic scope with namerefs [osh_.cc stdout] Expected 'F1=F1\nF1=x\n', got 'F1=F1\nF1=F1\n' stdout: F1=F1 F1=F1stderr: |
osh_.cc | 22 change reference itself [osh_.cc stdout] Expected 'ref=XX\nx=XX\ny=YY\n----\nref=YY\nx=XX\ny=YY\n----\nref=z\nx=XX\ny=z\n', got 'ref=x\nx=XX\ny=YY\n----\nref=y\nx=XX\ny=YY\n----\nref=z\nx=XX\ny=YY\n' stdout: ref=x x=XX y=YY ---- ref=y x=XX y=YY ---- ref=z x=XX y=YYstderr: |
osh | 23 a[2] in nameref [osh stdout] Expected 'ref=two\n', got 'ref=a[2]\n' stdout: ref=a[2]stderr: |
osh_.py | 23 a[2] in nameref [osh_.py stdout] Expected 'ref=two\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 23 a[2] in nameref [osh_.cc stdout] Expected 'ref=two\n', got 'ref=a[2]\n' stdout: ref=a[2]stderr: |
osh | 24 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_.py | 24 a[expr] in nameref -- DYNAMIC PARSING, don't want this [osh_.py stdout] Expected 'ref=three\n', got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 417, in <module> status = main(sys.argv) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 309, in main cmd_flags=cmd_eval.IsMainProgram) File "/home/andy/git/oilshell/oil/core/main_loop.py", line 168, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags=cmd_flags) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1461, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 547, in _Dispatch cmd_val = self.word_ev.EvalWordSequence2(words, allow_assign=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1868, in EvalWordSequence2 self._EvalWordToParts(w, False, part_vals) # not double quoted File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1455, in _EvalWordToParts self._EvalWordPart(p, part_vals, quoted=quoted, is_subst=is_subst) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1344, in _EvalWordPart self._EvalSimpleVarSub(part.token, part_vals, quoted) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1245, in _EvalSimpleVarSub val = self.mem.GetVar(var_name) File "/home/andy/git/oilshell/oil/core/state.py", line 1422, in GetVar cell, _, _ = self._ResolveNameOrRef(name, lookup_mode) File "/home/andy/git/oilshell/oil/core/state.py", line 1053, in _ResolveNameOrRef if self.exec_opts.strict_nameref(): AttributeError: 'NoneType' object has no attribute 'strict_nameref' |
osh_.cc | 24 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: |