| status | osh | osh-cpp | |
| pass | 10 | 11 | |
| ok | 4 | 4 | |
| FAIL | 2 | 1 | |
| total | 16 | 16 | |
| case | osh | osh-cpp | description |
| 0 | pass | pass | NUL bytes with echo -e |
| 1 | pass | pass | printf - literal NUL in format string |
| 2 | pass | pass | printf - \0 escape shows NUL byte |
| 3 | ok | ok | printf - NUL byte in value (OSH and zsh agree) |
| details | details | ||
| 4 | ok | ok | NUL bytes with echo $'\0' (OSH and zsh agree) |
| details | details | ||
| 5 | pass | pass | NUL bytes and IFS splitting |
| 6 | ok | ok | NUL bytes with test -n |
| details | details | ||
| 7 | FAIL | pass | NUL bytes with test -f |
| details | |||
| 8 | ok | ok | NUL bytes with ${#s} (OSH and zsh agree) |
| details | details | ||
| 9 | pass | pass | Compare \x00 byte versus \x01 byte - command sub |
| 10 | pass | pass | Compare \x00 byte versus \x01 byte - read builtin |
| 11 | pass | pass | Compare \x00 byte versus \x01 byte - read -n |
| 12 | FAIL | FAIL | Compare \x00 byte versus \x01 byte - mapfile builtin |
| details | details | ||
| 13 | pass | pass | Strip ops # ## % %% with NUL bytes |
| 14 | pass | pass | Issue 2269 Reduction |
| 15 | pass | pass | Issue 2269 - Do NUL bytes match ? in ${a#?} |
21 passed, 8 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped 2 failed under osh
| osh | 3 printf - NUL byte in value (OSH and zsh agree) stdout: \0 \n 00 0a \0 \n 00 0astderr: |
| osh-cpp | 3 printf - NUL byte in value (OSH and zsh agree) stdout: \0 \n 00 0a \0 \n 00 0astderr: |
| osh | 4 NUL bytes with echo $'\0' (OSH and zsh agree) stdout: \0 \n 00 0astderr: |
| osh-cpp | 4 NUL bytes with echo $'\0' (OSH and zsh agree) stdout: \0 \n 00 0astderr: |
| osh | 6 NUL bytes with test -n stdout: status=1 status=0stderr: |
| osh-cpp | 6 NUL bytes with test -n stdout: status=1 status=0stderr: |
| osh | 7 NUL bytes with test -f [osh stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\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 263, in <module>
sys.exit(main(sys.argv))
File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
return AppBundleMain(argv)
File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
bash_compat=(applet == 'bash'))
File "/home/uke/oil/core/shell.py", line 1301, in Main
cmd_flags=cmd_eval.IsMainProgram)
File "/home/uke/oil/core/main_loop.py", line 336, in Batch
was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
File "/home/uke/oil/core/main_loop.py", line 401, in Batch2
is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
File "/home/uke/oil/osh/cmd_eval.py", line 2366, in ExecuteAndCatch
status = self._Execute(node)
File "/home/uke/oil/osh/cmd_eval.py", line 2164, in _Execute
status = self._Dispatch(node, cmd_st)
File "/home/uke/oil/osh/cmd_eval.py", line 1891, in _Dispatch
status = self._DoSimple(node, cmd_st)
File "/home/uke/oil/osh/cmd_eval.py", line 1153, in _DoSimple
status = self._RunSimpleCommand(cmd_val, cmd_st, run_flags)
File "/home/uke/oil/osh/cmd_eval.py", line 766, in _RunSimpleCommand
run_flags)
File "/home/uke/oil/core/vm.py", line 235, in RunSimpleCommand
run_flags)
File "/home/uke/oil/core/executor.py", line 577, in _RunSimpleCommand
return self.RunBuiltin(builtin_id, cmd_val)
File "/home/uke/oil/core/vm.py", line 266, in RunBuiltin
return self._RunBuiltinProc(builtin_proc, cmd_val)
File "/home/uke/oil/core/vm.py", line 276, in _RunBuiltinProc
status = builtin_proc.Run(cmd_val)
File "/home/uke/oil/builtin/bracket_osh.py", line 277, in Run
b = bool_ev.EvalB(bool_node)
File "/home/uke/oil/osh/sh_expr_eval.py", line 1184, in EvalB
return bool_stat.DoUnaryOp(op_id, s)
File "/home/uke/oil/osh/bool_stat.py", line 46, in DoUnaryOp
st = posix.stat(s)
TypeError: stat() argument 1 must be encoded string without null bytes, not str
|
| osh | 8 NUL bytes with ${#s} (OSH and zsh agree) stdout: empty=0 nul=1stderr: |
| osh-cpp | 8 NUL bytes with ${#s} (OSH and zsh agree) stdout: empty=0 nul=1stderr: |
| osh | 12 Compare \x00 byte versus \x01 byte - mapfile builtin [osh stdout] Expected 'len=2\n 2e\n 2e\n' Got 'len=2\n 2e 00 2e\n 2e 00 2e\n' stdout: len=2 2e 00 2e 2e 00 2estderr: |
| osh-cpp | 12 Compare \x00 byte versus \x01 byte - mapfile builtin [osh-cpp stdout] Expected 'len=2\n 2e\n 2e\n' Got 'len=2\n 2e 00 2e\n 2e 00 2e\n' stdout: len=2 2e 00 2e 2e 00 2estderr: |