spec test index / oilshell.org
status | bash | osh | |
pass | 5 | 6 | |
ok | 2 | 0 | |
BUG | 1 | 0 | |
FAIL | 0 | 2 | |
total | 8 | 8 | |
case | bash | osh | description |
0 | pass | pass | history -a |
1 | pass | pass | history -r |
2 | pass | pass | HISTFILE is defined initially |
3 | pass | pass | HISTFILE must point to a file |
4 | ok | pass | HISTFILE set to array |
details | |||
5 | pass | pass | HISTFILE unset |
6 | BUG | FAIL | history -d to delete history item |
details | details | ||
7 | ok | FAIL | history usage |
details | details |
11 passed, 2 OK, 0 not implemented, 1 BUG, 2 failed, 0 timeouts, 0 cases skipped 2 failed under osh
bash | 4 HISTFILE set to array stdout: status=0 ^Dstderr: bash: cannot set terminal process group (6207): Inappropriate ioctl for device bash: no job control in this shell bash-5.2$ bash-5.2$ HISTFILE=(a b c) bash-5.2$ history -a bash-5.2$ echo status=$? bash-5.2$ bash-5.2$ exit |
bash | 6 history -d to delete history item stdout: 42 43 44 status=0 status=0 status=0 status=1 ^Dstderr: bash: cannot set terminal process group (6207): Inappropriate ioctl for device bash: no job control in this shell bash-5.2$ bash-5.2$ echo 42 bash-5.2$ echo 43 bash-5.2$ echo 44 bash-5.2$ bash-5.2$ history -a bash-5.2$ bash-5.2$ history -d 1 bash-5.2$ echo status=$? bash-5.2$ bash-5.2$ history -d -1 bash-5.2$ echo status=$? bash-5.2$ history -d -2 bash-5.2$ echo status=$? bash-5.2$ history -d 99 bash: history: 99: history position out of range bash-5.2$ echo status=$? bash-5.2$ bash-5.2$ case $SH in bash*) echo '^D' ;; esac bash-5.2$ bash-5.2$ exit |
osh | 6 history -d to delete history item [osh stdout] Expected '42\n43\n44\nstatus=0\nstatus=2\nstatus=2\nstatus=2\n^D\n' Got '42\n43\n44\nstatus=0\nstatus=2\nstatus=2\n' [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: 42 43 44 status=0 status=2 status=2stderr: osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ osh-0.23.0$ history -d -1 ^~ [ stdin -i ]:11: 'history' got invalid integer for -d: -1 osh-0.23.0$ osh-0.23.0$ history -d -2 ^~ [ stdin -i ]:13: 'history' got invalid integer for -d: -2 osh-0.23.0$ osh-0.23.0$ Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(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 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1138, in Main prompt_plugin, waiter, errfmt) File "/home/uke/oil/core/main_loop.py", line 271, in Interactive is_return, _ = cmd_ev.ExecuteAndCatch(node, 0) File "/home/uke/oil/osh/cmd_eval.py", line 2045, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1844, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1579, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 868, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 545, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 343, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 204, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 214, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/readline_osh.py", line 199, in Run e_usage("couldn't find item %d" % arg_d, loc.Missing) NameError: global name 'e_usage' is not defined |
bash | 7 history usage stdout: status=1 status=1stderr: bash: line 1: history: not-a-number: numeric argument required bash: line 4: history: too many arguments |
osh | 7 history usage [osh stdout] Expected 'status=2\nstatus=2\n', got '' [osh status] Expected 0, got 1 [osh stderr] Found 'Traceback (most recent' stdout: stderr: Traceback (most recent call last): File "/home/uke/oil/bin/oils_for_unix.py", line 201, in <module> sys.exit(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 140, in AppBundleMain return shell.Main('osh', arg_r, environ, login_shell, loader, readline) File "/home/uke/oil/core/shell.py", line 1218, in Main cmd_flags=cmd_eval.IsMainProgram) File "/home/uke/oil/core/main_loop.py", line 365, in Batch is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags) File "/home/uke/oil/osh/cmd_eval.py", line 2045, in ExecuteAndCatch status = self._Execute(node) File "/home/uke/oil/osh/cmd_eval.py", line 1844, in _Execute status = self._Dispatch(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 1579, in _Dispatch status = self._DoSimple(node, cmd_st) File "/home/uke/oil/osh/cmd_eval.py", line 868, in _DoSimple status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags) File "/home/uke/oil/osh/cmd_eval.py", line 545, in _RunSimpleCommand run_flags) File "/home/uke/oil/core/executor.py", line 343, in RunSimpleCommand return self.RunBuiltin(builtin_id, cmd_val) File "/home/uke/oil/core/executor.py", line 204, in RunBuiltin return self.RunBuiltinProc(builtin_proc, cmd_val) File "/home/uke/oil/core/executor.py", line 214, in RunBuiltinProc status = builtin_proc.Run(cmd_val) File "/home/uke/oil/builtin/readline_osh.py", line 215, in Run e_usage('got invalid argument %r' % num_arg, num_arg_loc) NameError: global name 'e_usage' is not defined |