Results for nul-bytes.test.sh

statusdashbashmkshzshashosh
pass 6161421310
ok 000414
N-I 1001120
BUG-2 001000
BUG 000900
FAIL 000002
total161616161616
casedashbashmkshzshashoshdescription
0N-I pass pass BUG pass pass NUL bytes with echo -e
detailsdetails
1N-I pass pass BUG N-I pass printf - literal NUL in format string
detailsdetailsdetails
2pass pass pass pass pass pass printf - \0 escape shows NUL byte
3N-I pass pass ok pass ok printf - NUL byte in value (OSH and zsh agree)
detailsdetailsdetails
4N-I pass pass ok pass ok NUL bytes with echo $'\0' (OSH and zsh agree)
detailsdetailsdetails
5N-I pass pass BUG pass pass NUL bytes and IFS splitting
detailsdetails
6N-I pass pass BUG pass ok NUL bytes with test -n
detailsdetailsdetails
7N-I pass pass pass ok FAIL NUL bytes with test -f
detailsdetailsdetails
8N-I pass pass ok pass ok NUL bytes with ${#s} (OSH and zsh agree)
detailsdetailsdetails
9pass pass pass BUG pass pass Compare \x00 byte versus \x01 byte - command sub
details
10pass pass pass BUG pass pass Compare \x00 byte versus \x01 byte - read builtin
details
11N-I pass BUG-2 BUG pass pass Compare \x00 byte versus \x01 byte - read -n
detailsdetailsdetails
12N-I pass N-I N-I N-I FAIL Compare \x00 byte versus \x01 byte - mapfile builtin
detailsdetailsdetailsdetailsdetails
13pass pass pass BUG pass pass Strip ops # ## % %% with NUL bytes
details
14pass pass pass BUG pass pass Issue 2269 Reduction
details
15pass pass pass ok pass pass Issue 2269 - Do NUL bytes match ? in ${a#?}
details
61 passed, 9 OK, 14 not implemented, 10 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

dash0 NUL bytes with echo -e

stdout:
stderr: 
zsh0 NUL bytes with echo -e

stdout:
  \0  \n
  00  0a
stderr:
dash1 printf - literal NUL in format string

stdout:
stderr: 
zsh1 printf - literal NUL in format string

stdout:
   x  \0   z
  78  00  7a
---
   x  \0   z
  78  00  7a
---
  \0   z
  00  7a
stderr:
ash1 printf - literal NUL in format string

stdout:
stderr: 
dash3 printf - NUL byte in value (OSH and zsh agree)

stdout:
stderr: 
zsh3 printf - NUL byte in value (OSH and zsh agree)

stdout:
  \0  \n
  00  0a
  \0  \n
  00  0a
stderr:
osh3 printf - NUL byte in value (OSH and zsh agree)

stdout:
  \0  \n
  00  0a
  \0  \n
  00  0a
stderr:
dash4 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:
stderr: 
zsh4 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:
  \0  \n
  00  0a
stderr:
osh4 NUL bytes with echo $'\0' (OSH and zsh agree)

stdout:
  \0  \n
  00  0a
stderr:
dash5 NUL bytes and IFS splitting

stdout:
stderr: 
zsh5 NUL bytes and IFS splitting

stdout:
['', '']
['']
['a', 'b']
['a']
stderr:
dash6 NUL bytes with test -n

stdout:
stderr: 
zsh6 NUL bytes with test -n

stdout:
status=0
status=0
stderr:
osh6 NUL bytes with test -n

stdout:
status=1
status=0
stderr:
dash7 NUL bytes with test -f

stdout:
stderr: 
ash7 NUL bytes with test -f

stdout:
status=1
status=0
status=1
status=1
stderr:
osh7 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 1296, 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
dash8 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
stderr: 
zsh8 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
empty=0
nul=1
stderr:
osh8 NUL bytes with ${#s} (OSH and zsh agree)

stdout:
empty=0
nul=1
stderr:
zsh9 Compare \x00 byte versus \x01 byte - command sub

stdout:
len=3
 2e 01 2e
len=3
 2e 00 2e
len=1
 00
stderr:
zsh10 Compare \x00 byte versus \x01 byte - read builtin

stdout:
len=3
 2e 01 2e
len=3
 2e 00 2e
len=1
 00
stderr:
dash11 Compare \x00 byte versus \x01 byte - read -n

stdout:
stderr: 
mksh11 Compare \x00 byte versus \x01 byte - read -n

stdout:
len=3
 2e 01 2e
len=1
 2e
len=0
stderr:
zsh11 Compare \x00 byte versus \x01 byte - read -n

stdout:
len=0
len=1
 2e
len=0
stderr:
dash12 Compare \x00 byte versus \x01 byte - mapfile builtin

stdout:
stderr: 
mksh12 Compare \x00 byte versus \x01 byte - mapfile builtin

stdout:
stderr: 
zsh12 Compare \x00 byte versus \x01 byte - mapfile builtin

stdout:
stderr: 
ash12 Compare \x00 byte versus \x01 byte - mapfile builtin

stdout:
stderr: 
osh12 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 2e
stderr:
zsh13 Strip ops # ## % %% with NUL bytes

stdout:
len=3
 00 2e 00
---
len=2
 2e 00
len=2
 2e 00
len=2
 00 2e
len=2
 00 2e
stderr:
zsh14 Issue 2269 Reduction

stdout:
len=2
 00 78
len=1
 78
---
len=2
 01 78
len=1
 78
stderr:
zsh15 Issue 2269 - Do NUL bytes match ? in ${a#?}

stdout:
escaped that'"'"'s it!
that's it!
---
writes binary data
stderr:
len=9
len=8
len=7
len=6
len=5
len=4
len=3
len=2
len=1
len=0