spec test index / oilshell.org
50 passed, 3 OK, 1 not implemented, 0 BUG, 48 failed, 0 timeouts, 0 cases skipped
osh_.cc | 0 local -a [osh_.cc stdout] Expected "['x', 'y', 'z']\n", got '(cmd_value.Argv argv:[argv.py x y z] arg_spids:[21 23 23 23])\n' stdout: (cmd_value.Argv argv:[argv.py x y z] arg_spids:[21 23 23 23])stderr: Unhandled SimpleCommand |
osh_.cc | 1 declare -a [osh_.cc stdout] Expected "['x', 'y', 'z']\n", got '(cmd_value.Argv argv:[argv.py x y z] arg_spids:[13 15 15 15])\n' stdout: (cmd_value.Argv argv:[argv.py x y z] arg_spids:[13 15 15 15])stderr: Unhandled SimpleCommand |
osh | 2 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_.py | 2 indexed LHS with spaces (not allowed in OSH) [osh_.py stdout] Expected 'status=127\n[]\n', got '[]\nstatus=1\n' stdout: [] status=1stderr: Error running ['a[1', '_tmp', 'tmp.txt', '1]=x', 'a[', '1', '+', '2', ']=z']: [Errno 2] No such file or directory |
osh_.cc | 2 indexed LHS with spaces (not allowed in OSH) [osh_.cc stdout] Expected 'status=127\n[]\n', got "(cmd_value.Argv\n argv: ['a[1' _tmp tmp.txt '1]=x' 'a[' 1 '+' 2 ']=z']\n arg_spids: [0 3 3 5 9 11 13 15 17]\n)\nstatus=0\n(cmd_value.Argv argv:[argv.py] arg_spids:[25])\n" stdout: (cmd_value.Argv argv: ['a[1' _tmp tmp.txt '1]=x' 'a[' 1 '+' 2 ']=z'] arg_spids: [0 3 3 5 9 11 13 15 17] ) status=0 (cmd_value.Argv argv:[argv.py] arg_spids:[25])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 3 declare -f exit code indicates function existence [osh_.py stdout] Expected '1\n1\n0\n', got '1\nmyfunc\n1\nmyfunc\nfunc2\n0\n' stdout: 1 myfunc 1 myfunc func2 0stderr: |
osh_.cc | 3 declare -f exit code indicates function existence [osh_.cc stdout] Expected '1\n1\n0\n', got '1\nmyfunc\n1\nmyfunc\nfunc2\n0\n' stdout: 1 myfunc 1 myfunc func2 0stderr: |
osh_.cc | 4 declare -F prints function names [osh_.cc stdout] Expected 'declare -f __ec\ndeclare -f _ab\ndeclare -f add\ndeclare -f div\ndeclare -f ek\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:917: List<Str *> *sorted(Dict<Str *, V> *) [V = syntax_asdl::command__ShFunction *]: Assertion `0' failed. |
osh_.py | 5 declare -p var (exit status) [osh_.py stdout] Expected '1\n1\n0\n', got '1\ndeclare -- var1=x\n1\ndeclare -- var1=x\ndeclare -- var2=y\n0\n' stdout: 1 declare -- var1=x 1 declare -- var1=x declare -- var2=y 0stderr: |
osh_.cc | 5 declare -p var (exit status) [osh_.cc stdout] Expected '1\n1\n0\n', got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh_.py | 6 declare [osh_.py 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 '' stdout: stderr: |
osh_.cc | 6 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: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |
osh_.py | 7 declare -p [osh_.py 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 '' stdout: stderr: |
osh_.cc | 7 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: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |
osh_.py | 8 declare -p var [osh_.py 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 '' stdout: stderr: |
osh_.cc | 8 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: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |
osh_.cc | 9 declare -p arr [osh_.cc stdout] Expected "declare -a test_arr1=()\ndeclare -a test_arr2=()\ndeclare -A test_arr3\ndeclare -a test_arr4=(1 2 3)\ndeclare -a test_arr5=(1 2 3)\ndeclare -A test_arr6=(['a']=1 ['b']=2 ['c']=3)\ndeclare -a test_arr7=(); test_arr7[3]=foo\n", got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh_.py | 10 declare -p foo=bar doesn't make sense [osh_.py stdout] Expected 'status=1\nstatus=1\ndeclare -- a=b\n', got 'status=1\ndeclare -- a=b\ndeclare -- a=b\nstatus=1\n' stdout: status=1 declare -- a=b declare -- a=b status=1stderr: |
osh_.cc | 10 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 -11 stdout: stderr: |
osh_.py | 11 declare -pnrx [osh_.py 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 '' stdout: stderr: |
osh_.cc | 11 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: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |
osh_.py | 12 declare -paA [osh_.py stdout] Expected '[declare -pa]\ndeclare -a test_var6=()\n[declare -pA]\ndeclare -A test_var7\n', got '' stdout: stderr: |
osh_.cc | 12 declare -paA [osh_.cc stdout] Expected '[declare -pa]\ndeclare -a test_var6=()\n[declare -pA]\ndeclare -A test_var7\n', got '' stdout: stderr: |
osh_.py | 13 declare -pnrx var [osh_.py 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 '' stdout: stderr: |
osh_.cc | 13 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: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |
osh_.py | 14 declare -pg [osh_.py stdout] Expected 'declare -- test_var1=global\n', got '' stdout: stderr: |
osh_.cc | 14 declare -pg [osh_.cc stdout] Expected 'declare -- test_var1=global\n', got '' stdout: stderr: |
osh_.py | 15 declare -pg var [osh_.py stdout] Expected 'declare -- test_var1=global\n', got '' stdout: stderr: |
osh_.cc | 15 declare -pg var [osh_.cc stdout] Expected 'declare -- test_var1=global\n', got '' stdout: stderr: |
osh_.py | 16 ble.sh: eval -- "$(declare -p var arr)" [osh_.py stdout] Expected 'sum=21\narr[0]=a2\narr[1]=a5\narr[2]=a8\narr[3]=a10\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 1326, in _EvalWordPart self._EvalDoubleQuoted(part.parts, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 821, in _EvalDoubleQuoted self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 16 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 'sum=\n' stdout: sum=stderr: |
osh_.py | 17 eval -- "$(declare -p arr)" (restore arrays w/ unset elements) [osh_.py stdout] Expected 'arr[0]: unset\narr[1]: unset\narr[2]: unset\narr[3]: set ... []\narr[4]: set ... [foo]\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 1326, in _EvalWordPart self._EvalDoubleQuoted(part.parts, part_vals) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 821, in _EvalDoubleQuoted self._EvalWordPart(p, part_vals, quoted=True) File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1332, in _EvalWordPart sv = self._EvalCommandSub(part.child, quoted) # type: part_value_t File "/home/andy/git/oilshell/oil/osh/word_eval.py", line 1959, in _EvalCommandSub stdout = self.shell_ex.RunCommandSub(node) AttributeError: 'NoneType' object has no attribute 'RunCommandSub' |
osh_.cc | 17 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 'arr[0]: set ... [1]\narr[1]: set ... [2]\narr[2]: set ... [3]\narr[3]: unset\narr[4]: unset\n' stdout: arr[0]: set ... [1] arr[1]: set ... [2] arr[2]: set ... [3] arr[3]: unset arr[4]: unsetstderr: |
osh_.py | 18 typeset -f [osh_.py stdout] Expected '1\n1\n0\n', got '1\nmyfunc\n1\nmyfunc\nfunc2\n0\n' stdout: 1 myfunc 1 myfunc func2 0stderr: |
osh_.cc | 18 typeset -f [osh_.cc stdout] Expected '1\n1\n0\n', got '1\nmyfunc\n1\nmyfunc\nfunc2\n0\n' stdout: 1 myfunc 1 myfunc func2 0stderr: |
osh_.py | 19 typeset -p [osh_.py stdout] Expected '1\n1\n0\n', got '1\ndeclare -- var1=x\n1\ndeclare -- var1=x\ndeclare -- var2=y\n0\n' stdout: 1 declare -- var1=x 1 declare -- var1=x declare -- var2=y 0stderr: |
osh_.cc | 19 typeset -p [osh_.cc stdout] Expected '1\n1\n0\n', got '' [osh_.cc status] Expected 0, got -11 stdout: stderr: |
osh_.cc | 20 typeset -r makes a string readonly [osh_.cc stdout] Expected u'', got 'status=0\nstatus=0\nstatus=0\nstatus=0\nstatus=0\nstatus=0\n' [osh_.cc status] Expected 1, got 0 stdout: status=0 status=0 status=0 status=0 status=0 status=0stderr: |
osh_.cc | 21 typeset -ar makes it readonly [osh_.cc stdout] Expected u'', got 'status=0\nstatus=0\nstatus=0\nstatus=0\nstatus=0\nstatus=0\n' [osh_.cc status] Expected 1, got 0 stdout: status=0 status=0 status=0 status=0 status=0 status=0stderr: |
osh_.py | 22 typeset -x makes it exported [osh_.py stdout] Expected 'lib/\n', got '/home/andy/git/oilshell/oil:/home/andy/git/oilshell/oil/vendor\n' stdout: /home/andy/git/oilshell/oil:/home/andy/git/oilshell/oil/vendorstderr: |
osh_.cc | 22 typeset -x makes it exported [osh_.cc stdout] Expected 'lib/\n', got '(cmd_value.Argv argv:[printenv.py PYTHONPATH] arg_spids:[7 9])\n' stdout: (cmd_value.Argv argv:[printenv.py PYTHONPATH] arg_spids:[7 9])stderr: Unhandled SimpleCommand |
osh_.cc | 26 declare -g (bash-specific; bash-completion uses it) [osh_.cc stdout] Expected "['42', '']\n['bar', '']\n['ev2']\n", got '(cmd_value.Argv argv:[argv.py 42 99] arg_spids:[87 89 93])\n(cmd_value.Argv argv:[argv.py bar Eggs] arg_spids:[97 99 110])\n(cmd_value.Argv argv:[argv.py ev2] arg_spids:[121 123])\n' stdout: (cmd_value.Argv argv:[argv.py 42 99] arg_spids:[87 89 93]) (cmd_value.Argv argv:[argv.py bar Eggs] arg_spids:[97 99 110]) (cmd_value.Argv argv:[argv.py ev2] arg_spids:[121 123])stderr: Unhandled SimpleCommand Unhandled SimpleCommand Unhandled SimpleCommand |
osh | 27 myvar=typeset (another form of dynamic assignment) stdout: a bstderr: |
osh_.py | 27 myvar=typeset (another form of dynamic assignment) stdout: a bstderr: |
osh_.cc | 27 myvar=typeset (another form of dynamic assignment) stdout: a bstderr: |
osh_.py | 28 dynamic array parsing is not allowed [osh_.py stdout] Expected "status=2\n['']\n", got "['']\nstatus=2\n" stdout: [''] status=2stderr: typeset -a "$code" # note: -a flag is required ^ [ stdin ]:2: 'typeset' Got -a but RHS isn't an array |
osh_.cc | 28 dynamic array parsing is not allowed [osh_.cc stdout] Expected "status=2\n['']\n", got "status=2\n(cmd_value.Argv argv:[argv.py ''] arg_spids:[21 23])\n" stdout: status=2 (cmd_value.Argv argv:[argv.py ''] arg_spids:[21 23])stderr: typeset -a "$code" # note: -a flag is required ^ [ stdin ]:2: 'typeset' Got -a but RHS isn't an array Unhandled SimpleCommand |
osh_.py | 29 dynamic flag in array in assign builtin [osh_.py stdout] Expected 'foo=F\nbar=B\nF\nB\n', got 'None\nNone\nfoo=F\nbar=B\n' stdout: None None foo=F bar=Bstderr: |
osh_.cc | 29 dynamic flag in array in assign builtin [osh_.cc stdout] Expected 'foo=F\nbar=B\nF\nB\n', got 'foo=F\nbar=B\n(cmd_value.Argv argv:[printenv.py foo] arg_spids:[49 51])\n(cmd_value.Argv argv:[printenv.py bar] arg_spids:[53 55])\n' stdout: foo=F bar=B (cmd_value.Argv argv:[printenv.py foo] arg_spids:[49 51]) (cmd_value.Argv argv:[printenv.py bar] arg_spids:[53 55])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.py | 30 typeset +x [osh_.py stdout] Expected 'E\nNone\n', got 'None\nNone\n' stdout: None Nonestderr: |
osh_.cc | 30 typeset +x [osh_.cc stdout] Expected 'E\nNone\n', got '(cmd_value.Argv argv:[printenv.py e] arg_spids:[5 7])\n(cmd_value.Argv argv:[printenv.py e] arg_spids:[17 19])\n' stdout: (cmd_value.Argv argv:[printenv.py e] arg_spids:[5 7]) (cmd_value.Argv argv:[printenv.py e] arg_spids:[17 19])stderr: Unhandled SimpleCommand Unhandled SimpleCommand |
osh_.cc | 31 typeset +r removes read-only attribute (TODO: documented in bash to do nothing) [osh_.cc stdout] Expected 'r=r1\nr=r2\nr=r3\n', got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: osh_eval.dbg: mycpp/mylib.h:596: V Dict<Str *, runtime_asdl::value_t *>::index(K) [K = Str *, V = runtime_asdl::value_t *]: Assertion `0' failed. |