spec test index / oilshell.org
status | osh | osh_.py | osh_.cc | |
pass | 10 | 2 | 2 | |
FAIL | 0 | 8 | 8 | |
total | 10 | 10 | 10 | |
case | osh | osh_.py | osh_.cc | description |
0 | pass | FAIL | FAIL | ${FUNCNAME[@]} array |
details | details | |||
1 | pass | FAIL | FAIL | FUNCNAME with source (scalar or array) |
details | details | |||
2 | pass | FAIL | FAIL | BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv) |
details | details | |||
3 | pass | FAIL | FAIL | ${FUNCNAME} with prefix/suffix operators |
details | details | |||
4 | pass | FAIL | FAIL | operators on FUNCNAME not allowed by default |
details | details | |||
5 | pass | pass | pass | ${FUNCNAME} and "set -u" (OSH regression) |
6 | pass | pass | pass | $((BASH_LINENO)) (scalar form in arith) |
7 | pass | FAIL | FAIL | ${BASH_SOURCE[@]} with source and function name |
details | details | |||
8 | pass | FAIL | FAIL | ${BASH_SOURCE[@]} with line numbers |
details | details | |||
9 | pass | FAIL | FAIL | ${BASH_LINENO[@]} is a stack of line numbers for function calls |
details | details |
14 passed, 0 OK, 0 not implemented, 0 BUG, 16 failed, 0 timeouts, 0 cases skipped
osh_.py | 0 ${FUNCNAME[@]} array [osh_.py stdout] Expected "['f']\n['g', 'f']\n['f']\n", got '' [osh_.py status] Expected 0, got 127 stdout: stderr: argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:7: 'argv.py' not found |
osh_.cc | 0 ${FUNCNAME[@]} array [osh_.cc stdout] Expected "['f']\n['g', 'f']\n['f']\n", got '' [osh_.cc status] Expected 0, got 127 stdout: stderr: argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${FUNCNAME[@]}" ^~~~~~~ [ stdin ]:7: 'argv.py' not found |
osh_.py | 1 FUNCNAME with source (scalar or array) [osh_.py stdout] Expected "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @', 'source']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[]\n", got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 451, 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 1438, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 212, in RunSimpleCommand status = self.cmd_ev.RunProc(func_node, argv[1:]) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1522, in RunProc status = self._Execute(func_node.body) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 954, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _ExecuteList status = self._Execute(child) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 212, in RunSimpleCommand status = self.cmd_ev.RunProc(func_node, argv[1:]) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1522, in RunProc status = self._Execute(func_node.body) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 954, in _Dispatch status = self._ExecuteList(node.children) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1341, in _ExecuteList status = self._Execute(child) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 184, in RunSimpleCommand status = self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 112, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 2 |
osh_.cc | 1 FUNCNAME with source (scalar or array) [osh_.cc stdout] Expected "[' @', 'source', 'f', 'g']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[' @', 'source']\n[' 0', 'source']\n['${}', 'source']\n[' $', 'source']\n-----\n[]\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined osh_eval.dbg: mycpp/mylib.h:730: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed. |
osh_.py | 2 BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv) [osh_.py stdout] Expected "['']\n['']\n['']\n['']\n['']\n['']\n__\n['spec/testdata/bash-source-string.sh']\n['spec/testdata/bash-source-string.sh']\n['9']\n['9']\n____\n['spec/testdata/bash-source-string2.sh']\n['spec/testdata/bash-source-string2.sh']\n['11']\n['11']\n", got '__\n' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: __stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined argv.py "$BASH_SOURCE" # SimpleVarSub ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${BASH_SOURCE}" # BracedVarSub ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "$BASH_LINENO" # SimpleVarSub ^~~~~~~ [ stdin ]:4: 'argv.py' not found argv.py "${BASH_LINENO}" # BracedVarSub ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py "$FUNCNAME" # SimpleVarSub ^~~~~~~ [ stdin ]:6: 'argv.py' not found argv.py "${FUNCNAME}" # BracedVarSub ^~~~~~~ [ stdin ]:7: 'argv.py' not found Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 451, 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 1438, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 231, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 112, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 30 |
osh_.cc | 2 BASH_SOURCE and BASH_LINENO scalar or array (e.g. for virtualenv) [osh_.cc stdout] Expected "['']\n['']\n['']\n['']\n['']\n['']\n__\n['spec/testdata/bash-source-string.sh']\n['spec/testdata/bash-source-string.sh']\n['9']\n['9']\n____\n['spec/testdata/bash-source-string2.sh']\n['spec/testdata/bash-source-string2.sh']\n['11']\n['11']\n", got '__\n' [osh_.cc status] Expected 0, got -6 stdout: __stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined argv.py "$BASH_SOURCE" # SimpleVarSub ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${BASH_SOURCE}" # BracedVarSub ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "$BASH_LINENO" # SimpleVarSub ^~~~~~~ [ stdin ]:4: 'argv.py' not found argv.py "${BASH_LINENO}" # BracedVarSub ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py "$FUNCNAME" # SimpleVarSub ^~~~~~~ [ stdin ]:6: 'argv.py' not found argv.py "${FUNCNAME}" # BracedVarSub ^~~~~~~ [ stdin ]:7: 'argv.py' not found osh_eval.dbg: mycpp/mylib.h:730: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed. |
osh_.py | 3 ${FUNCNAME} with prefix/suffix operators [osh_.py stdout] Expected "['5']\n['c']\n['heck']\n", got '' [osh_.py status] Expected 0, got 127 stdout: stderr: argv.py "${#FUNCNAME}" ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "${FUNCNAME::1}" ^~~~~~~ [ stdin ]:4: 'argv.py' not found argv.py "${FUNCNAME:1}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found |
osh_.cc | 3 ${FUNCNAME} with prefix/suffix operators [osh_.cc stdout] Expected "['5']\n['c']\n['heck']\n", got '' [osh_.cc status] Expected 0, got 127 stdout: stderr: argv.py "${#FUNCNAME}" ^~~~~~~ [ stdin ]:3: 'argv.py' not found argv.py "${FUNCNAME::1}" ^~~~~~~ [ stdin ]:4: 'argv.py' not found argv.py "${FUNCNAME:1}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found |
osh_.py | 4 operators on FUNCNAME not allowed by default [osh_.py stdout] Expected "['check']\n", got '' stdout: stderr: argv.py "${FUNCNAME}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${#FUNCNAME}" ^~ [ stdin ]:3: fatal: Array 'FUNCNAME' can't be referred to as a scalar (without @ or *) |
osh_.cc | 4 operators on FUNCNAME not allowed by default [osh_.cc stdout] Expected "['check']\n", got '' stdout: stderr: argv.py "${FUNCNAME}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py "${#FUNCNAME}" ^~~~~~~ [ stdin ]:3: fatal: Array 'FUNCNAME' can't be referred to as a scalar (without @ or *) |
osh_.py | 7 ${BASH_SOURCE[@]} with source and function name [osh_.py stdout] Expected "[]\n['spec/testdata/bash-source-simple.sh']\n['spec/testdata/bash-source-simple.sh']\n", got '' [osh_.py status] Expected 0, got 1 [osh_.py stderr] Found 'Traceback (most recent' stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined argv.py "${BASH_SOURCE[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found Traceback (most recent call last): File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 71, in <module> sys.exit(main(sys.argv)) File "/home/andy/git/oilshell/oil/bin/osh_eval.py", line 39, in main status = pure.Main('osh', arg_r, environ, login_shell, loader, None) File "/home/andy/git/oilshell/oil/core/pure.py", line 451, 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 1438, in ExecuteAndCatch status = self._Execute(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 1318, in _Execute status, check_errexit = self._Dispatch(node) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 570, in _Dispatch status = self._RunSimpleCommand(cmd_val, node.do_fork) File "/home/andy/git/oilshell/oil/osh/cmd_eval.py", line 481, in _RunSimpleCommand return self.shell_ex.RunSimpleCommand(cmd_val, do_fork) File "/home/andy/git/oilshell/oil/core/executor.py", line 231, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/andy/git/oilshell/oil/core/executor.py", line 112, in RunBuiltin builtin_func = self.builtins[builtin_id] KeyError: 30 |
osh_.cc | 7 ${BASH_SOURCE[@]} with source and function name [osh_.cc stdout] Expected "[]\n['spec/testdata/bash-source-simple.sh']\n['spec/testdata/bash-source-simple.sh']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined argv.py "${BASH_SOURCE[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found osh_eval.dbg: mycpp/mylib.h:730: V Dict<int, vm::_Builtin *>::index(K) [K = int, V = vm::_Builtin *]: Assertion `0' failed. |
osh_.py | 8 ${BASH_SOURCE[@]} with line numbers [osh_.py stdout] Expected "['begin F funcs', 'f', 'main']\n['begin F files', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['begin F lines', '21', '0']\n['G funcs', 'g', 'f', 'main']\n['G files', 'spec/testdata/bash-source-2.sh', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['G lines', '15', '21', '0']\n['end F funcs', 'f', 'main']\n['end F', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['end F lines', '21', '0']\n", got '' [osh_.py status] Expected 0, got 127 stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined $SH spec/testdata/bash-source.sh ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ stdin ]:2: 'spec/testdata/bash-source.sh' not found |
osh_.cc | 8 ${BASH_SOURCE[@]} with line numbers [osh_.cc stdout] Expected "['begin F funcs', 'f', 'main']\n['begin F files', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['begin F lines', '21', '0']\n['G funcs', 'g', 'f', 'main']\n['G files', 'spec/testdata/bash-source-2.sh', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['G lines', '15', '21', '0']\n['end F funcs', 'f', 'main']\n['end F', 'spec/testdata/bash-source.sh', 'spec/testdata/bash-source.sh']\n['end F lines', '21', '0']\n", got '' [osh_.cc status] Expected 0, got -6 stdout: stderr: cd $REPO_ROOT ^~ [ stdin ]:1: $HOME isn't defined osh_eval.dbg: cpp/pylib_path_stat.h:10: bool path_stat::exists(Str *): Assertion `0' failed. |
osh_.py | 9 ${BASH_LINENO[@]} is a stack of line numbers for function calls [osh_.py stdout] Expected "[]\n['begin F', '10']\n['G', '6', '10']\n['end F', '10']\n", got '' [osh_.py status] Expected 0, got 127 stdout: stderr: argv.py ${BASH_LINENO[@]} ^~~~~~~ [ stdin ]:9: 'argv.py' not found argv.py 'begin F' "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py G "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py 'end F' "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:7: 'argv.py' not found |
osh_.cc | 9 ${BASH_LINENO[@]} is a stack of line numbers for function calls [osh_.cc stdout] Expected "[]\n['begin F', '10']\n['G', '6', '10']\n['end F', '10']\n", got '' [osh_.cc status] Expected 0, got 127 stdout: stderr: argv.py ${BASH_LINENO[@]} ^~~~~~~ [ stdin ]:9: 'argv.py' not found argv.py 'begin F' "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:5: 'argv.py' not found argv.py G "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:2: 'argv.py' not found argv.py 'end F' "${BASH_LINENO[@]}" ^~~~~~~ [ stdin ]:7: 'argv.py' not found |