spec test index / oilshell.org
status | ysh | ysh_ALT | |
pass | 7 | 0 | |
FAIL | 2 | 9 | |
total | 9 | 9 | |
case | ysh | ysh_ALT | description |
0 | pass | FAIL | args.ysh example usage |
details | |||
1 | pass | FAIL | Bool flag, positional args, more positional |
details | |||
2 | pass | FAIL | Test multiple ARGVs against a parser |
details | |||
3 | FAIL | FAIL | Basic help message |
details | details | ||
4 | FAIL | FAIL | Compare parseArgs() vs Python argparse |
details | details | ||
5 | pass | FAIL | Define spec and print it |
details | |||
6 | pass | FAIL | Default values |
details | |||
7 | pass | FAIL | Duplicate argument/flag names |
details | |||
8 | pass | FAIL | Error cases |
details |
7 passed, 0 OK, 0 not implemented, 0 BUG, 11 failed, 0 timeouts, 0 cases skipped 2 failed under osh
ysh_ALT | 0 args.ysh example usage [ysh_ALT stdout] Expected 'Verbose false\n(Dict) {"src":"mysrc","max-procs":12,"dest":"mydest","files":["a","b","c"],"verbose":false,"invert":true}\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 1 Bool flag, positional args, more positional [ysh_ALT stdout] Expected '(Dict) {"verbose":true,"src":"src/path","dst":"dst/path","more":["x","y","z"]}\nsrc/path -> dst/path\nx\ny\nz\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 2 Test multiple ARGVs against a parser [ysh_ALT stdout] Expected '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n---------- -v --count 120 example.sh -v ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n---------- -v --count 120 example.sh -v --count 150 ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v --count 150\n(Dict) {"verbose":true,"count":150,"file":"example.sh"}\n\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh | 3 Basic help message [ysh stdout] Expected 'usage: program-name [-h] [-v] src dst\n\nReference Implementation\n\npositional arguments:\n src\n dst\n\noptions:\n -h, --help show this help message and exit\n -v, --verbose Verbose\n' Got '' [ysh status] Expected 0, got 127 stdout: stderr: description ''' ^~~~~~~~~~~ [ stdin ]:4: 'description' not found (OILS-ERR-100) [ stdin ]:4: errexit PID 40814: command.Simple failed with status 127 |
ysh_ALT | 3 Basic help message [ysh_ALT stdout] Expected 'usage: program-name [-h] [-v] src dst\n\nReference Implementation\n\npositional arguments:\n src\n dst\n\noptions:\n -h, --help show this help message and exit\n -v, --verbose Verbose\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh | 4 Compare parseArgs() vs Python argparse [ysh stdout] Expected '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v --count 150 ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v --count 150\n(Dict) {"verbose":true,"count":150,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v --count 150\nNamespace(filename=\'example.sh\', count=\'150\', verbose=True)\n\n' Got '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh\n' [ysh status] Expected 0, got 127 stdout: ---------- -v --count 120 example.sh ---------- $ bin/ysh example.sh -v --count 120 example.sh (Dict) {"verbose":true,"count":120,"file":"example.sh"} $ python3 example.py -v --count 120 example.shstderr: python3 -c $argparse_py @args ^~~~~~~ [ stdin ]:42: 'python3' not found (OILS-ERR-100) [ stdin ]:42: errexit PID 40818: command.Simple failed with status 127 |
ysh_ALT | 4 Compare parseArgs() vs Python argparse [ysh_ALT stdout] Expected '---------- -v --count 120 example.sh ----------\n$ bin/ysh example.sh -v --count 120 example.sh\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v\n(Dict) {"verbose":true,"count":120,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v\nNamespace(filename=\'example.sh\', count=\'120\', verbose=True)\n\n---------- -v --count 120 example.sh -v --count 150 ----------\n$ bin/ysh example.sh -v --count 120 example.sh -v --count 150\n(Dict) {"verbose":true,"count":150,"file":"example.sh"}\n\n$ python3 example.py -v --count 120 example.sh -v --count 150\nNamespace(filename=\'example.sh\', count=\'150\', verbose=True)\n\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 5 Define spec and print it [ysh_ALT stdout] Expected '{\n "flags": [\n {\n "short": "-v",\n "long": "--verbose",\n "name": "verbose",\n "type": "bool",\n "default": false,\n "help": null\n }\n ],\n "args": [\n {\n "name": "src",\n "help": null\n },\n {\n "name": "dst",\n "help": null\n }\n ],\n "rest": "more"\n}\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 6 Default values [ysh_ALT stdout] Expected '(Dict) {"sanitize":false,"verbose":false,"max-procs":null}\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 7 Duplicate argument/flag names [ysh_ALT stdout] Expected 'status=3\nstatus=3\nstatus=3\n', got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |
ysh_ALT | 8 Error cases [ysh_ALT stdout] Expected 'status=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\nstatus=2\n' Got '' [ysh_ALT status] Expected 0, got 1 [ysh_ALT stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oil.py", line 34, in _cpython_main_hook sys.exit(oils_for_unix.main(sys.argv)) File "/home/uke/oil/bin/oils_for_unix.py", line 170, in main return AppBundleMain(argv) File "/home/uke/oil/bin/oils_for_unix.py", line 137, in AppBundleMain return shell.Main('ysh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1155, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 376, in Batch return status File "/home/uke/oil/osh/cmd_eval.py", line 2018, in ExecuteAndCatch status = e.StatusCode() File "/home/uke/oil/osh/cmd_eval.py", line 1809, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1546, in _Dispatch status = self._DoExpandedAlias(node) File "/home/uke/oil/osh/cmd_eval.py", line 833, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 520, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 325, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 209, in RunBuiltin status = builtin_func.Run(cmd_val) File "/home/uke/oil/builtin/meta_osh.py", line 182, in Run resolved = path_arg IndexError: list index out of range FATAL: couldn't import from app bundle '/home/uke/oil/_tmp/oil-tar-test/oil-0.22.0/_bin/ysh' (1) Stripping the oil.ovm binary may cause this error. See https://github.com/oilshell/oil/issues/47 |