Results for nul-bytes.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 15131311210
ok 0000004
N-I 0100000
BUG-2 0100000
FAIL 0021414131
total15151515151515
casebashmkshkshtoyshsushbrushoshdescription
0pass pass pass FAIL pass pass pass NUL bytes with echo -e
details
1pass pass pass pass FAIL pass pass NUL bytes in printf format
details
2pass pass pass FAIL FAIL FAIL ok NUL bytes in printf value (OSH and zsh agree)
detailsdetailsdetailsdetails
3pass pass pass FAIL FAIL FAIL ok NUL bytes with echo $'\0' (OSH and zsh agree)
detailsdetailsdetailsdetails
4pass pass pass FAIL FAIL FAIL pass NUL bytes and IFS splitting
detailsdetailsdetails
5pass pass pass FAIL FAIL FAIL ok NUL bytes with test -n
detailsdetailsdetailsdetails
6pass pass pass FAIL FAIL FAIL pass NUL bytes with test -f
detailsdetailsdetails
7pass pass pass FAIL FAIL FAIL ok NUL bytes with ${#s} (OSH and zsh agree)
detailsdetailsdetailsdetails
8pass pass pass FAIL FAIL FAIL pass Compare \x00 byte versus \x01 byte - command sub
detailsdetailsdetails
9pass pass pass FAIL FAIL FAIL pass Compare \x00 byte versus \x01 byte - read builtin
detailsdetailsdetails
10pass BUG-2 FAIL FAIL FAIL FAIL pass Compare \x00 byte versus \x01 byte - read -n
detailsdetailsdetailsdetailsdetails
11pass N-I FAIL FAIL FAIL FAIL FAIL Compare \x00 byte versus \x01 byte - mapfile builtin
detailsdetailsdetailsdetailsdetailsdetails
12pass pass pass FAIL FAIL FAIL pass Strip ops # ## % %% with NUL bytes
detailsdetailsdetails
13pass pass pass FAIL FAIL FAIL pass Issue 2269 Reduction
detailsdetailsdetails
14pass pass pass FAIL FAIL FAIL pass Issue 2269 - Do NUL bytes match ? in ${a#?}
detailsdetailsdetails
55 passed, 4 OK, 1 not implemented, 1 BUG, 44 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

toysh0 NUL bytes with echo -e

[toysh stdout] Expected '\x00-\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush1 NUL bytes in printf format

[sush stdout] Expected '\x00\n', got '\\0\n'

stdout:
\0
stderr:
toysh2 NUL bytes in printf value (OSH and zsh agree)

[toysh stdout] Expected '\n\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush2 NUL bytes in printf value (OSH and zsh agree)

[sush stdout] Expected '\n\n', got '\x00\n'

stdout:

stderr:
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush2 NUL bytes in printf value (OSH and zsh agree)

[brush stdout] Expected '\n\n', got '\x00\n\x00\n'

stdout:


stderr:
osh2 NUL bytes in printf value (OSH and zsh agree)

stdout:


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

[toysh stdout] Expected '\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush3 NUL bytes with echo $'\0' (OSH and zsh agree)

[sush stdout] Expected '\n', got ''
[sush status] Expected 0, got 101

stdout:
stderr: 
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush3 NUL bytes with echo $'\0' (OSH and zsh agree)

[brush stdout] Expected '\n', got '\x00\n'

stdout:

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

stdout:

stderr:
toysh4 NUL bytes and IFS splitting

[toysh stdout] Expected "[]\n['']\n['ab']\n['ab']\n", got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush4 NUL bytes and IFS splitting

[sush stdout] Expected "[]\n['']\n['ab']\n['ab']\n", got ''
[sush status] Expected 0, got 101

stdout:
stderr: 
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(1, [97, 0, 98])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(1, [97, 0, 98])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush4 NUL bytes and IFS splitting

[brush stdout] Expected "[]\n['']\n['ab']\n['ab']\n", got ''

stdout:
stderr: 
ERROR nul byte found in provided data
ERROR nul byte found in provided data
ERROR nul byte found in provided data
ERROR nul byte found in provided data
toysh5 NUL bytes with test -n

[toysh stdout] Expected 'status=1\nstatus=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush5 NUL bytes with test -n

[sush stdout] Expected 'status=1\nstatus=1\n', got 'status=1\nstatus=101\n'

stdout:
status=1
status=101
stderr:
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush5 NUL bytes with test -n

[brush stdout] Expected 'status=1\nstatus=1\n', got 'status=1\nstatus=0\n'

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

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

[toysh stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush6 NUL bytes with test -f

[sush stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\n', got 'status=101\nstatus=101\nstatus=101\nstatus=1\n'

stdout:
status=101
status=101
status=101
status=1
stderr:
thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(0, [0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(3, [102, 111, 111, 0])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(3, [102, 111, 111, 0, 98, 97, 114])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush6 NUL bytes with test -f

[brush stdout] Expected 'status=1\nstatus=0\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1
status=1
status=1
stderr:
toysh7 NUL bytes with ${#s} (OSH and zsh agree)

[toysh stdout] Expected 'empty=0\nnul=0\n', got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush7 NUL bytes with ${#s} (OSH and zsh agree)

[sush stdout] Expected 'empty=0\nnul=0\n', got 'empty=0\nnul=1\n'

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

[brush stdout] Expected 'empty=0\nnul=0\n', got 'empty=0\nnul=1\n'

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

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

[toysh stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=3\n 2e 01 2e\nlen=1\n 2e\nlen=0\n'

stdout:
len=3
 2e 01 2e
len=1
 2e
len=0
stderr:
sush8 Compare \x00 byte versus \x01 byte - command sub

[sush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=6\n 2e 5c 30 30 31 2e\nlen=6\n 2e 5c 30 30 30 2e\nlen=4\n 5c 30 30 30\n'

stdout:
len=6
 2e 5c 30 30 31 2e
len=6
 2e 5c 30 30 30 2e
len=4
 5c 30 30 30
stderr:
brush8 Compare \x00 byte versus \x01 byte - command sub

[brush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=3\n 2e 01 2e\nlen=3\n 2e 00 2e\nlen=1\n 00\n'

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

[toysh stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=0\nlen=0\nlen=0\n'

stdout:
len=0
len=0
len=0
stderr:
sh: read: No such file or directory
sh: read: No such file or directory
sh: read: No such file or directory
sush9 Compare \x00 byte versus \x01 byte - read builtin

[sush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=5\n 2e 30 30 31 2e\nlen=5\n 2e 30 30 30 2e\nlen=3\n 30 30 30\n'

stdout:
len=5
 2e 30 30 31 2e
len=5
 2e 30 30 30 2e
len=3
 30 30 30
stderr:
brush9 Compare \x00 byte versus \x01 byte - read builtin

[brush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=2\n 2e 2e\nlen=2\n 2e 2e\nlen=0\n'

stdout:
len=2
 2e 2e
len=2
 2e 2e
len=0
stderr:
mksh10 Compare \x00 byte versus \x01 byte - read -n

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

[ksh stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=3\n 2e 01 2e\nlen=1\n 2e\nlen=0\n'

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

[toysh stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush10 Compare \x00 byte versus \x01 byte - read -n

[sush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=3\n 2e 30 30\nlen=3\n 2e 30 30\nlen=3\n 30 30 30\n'

stdout:
len=3
 2e 30 30
len=3
 2e 30 30
len=3
 30 30 30
stderr:
brush10 Compare \x00 byte versus \x01 byte - read -n

[brush stdout] Expected 'len=3\n 2e 01 2e\nlen=2\n 2e 2e\nlen=0\n', got 'len=2\n 2e 2e\nlen=2\n 2e 2e\nlen=0\n'

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

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

[ksh stdout] Expected 'len=2\n 2e\n 2e\n', got 'len=0\n'

stdout:
len=0
stderr:
E: ksh: <stdin>[12]: mapfile: inaccessible or not found
printf: write error: Broken pipe
printf: write error: Broken pipe
toysh11 Compare \x00 byte versus \x01 byte - mapfile builtin

[toysh stdout] Expected 'len=2\n 2e\n 2e\n', got ''
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush11 Compare \x00 byte versus \x01 byte - mapfile builtin

[sush stdout] Expected 'len=2\n 2e\n 2e\n', got 'len=0\n'

stdout:
len=0
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 7: mapfile: command not found
brush11 Compare \x00 byte versus \x01 byte - mapfile builtin

[brush 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:
osh11 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:
toysh12 Strip ops # ## % %% with NUL bytes

[toysh stdout] Expected 'len=1\n 2e\n---\nlen=0\nlen=0\nlen=0\nlen=0\n', got 'len=0\n---\nlen=20\n 28 70 72 69 6e 74 66 20 27 5c 30 30 30 2e 5c 30\n 30 30 27 29\nlen=20\n 28 70 72 69 6e 74 66 20 27 5c 30 30 30 2e 5c 30\n 30 30 27 29\nlen=0\nlen=0\n'

stdout:
len=0
---
len=20
 28 70 72 69 6e 74 66 20 27 5c 30 30 30 2e 5c 30
 30 30 27 29
len=20
 28 70 72 69 6e 74 66 20 27 5c 30 30 30 2e 5c 30
 30 30 27 29
len=0
len=0
stderr:
sush12 Strip ops # ## % %% with NUL bytes

[sush stdout] Expected 'len=1\n 2e\n---\nlen=0\nlen=0\nlen=0\nlen=0\n', got 'len=9\n 5c 30 30 30 2e 5c 30 30 30\n---\nlen=8\n 30 30 30 2e 5c 30 30 30\nlen=8\n 30 30 30 2e 5c 30 30 30\nlen=8\n 5c 30 30 30 2e 5c 30 30\nlen=8\n 5c 30 30 30 2e 5c 30 30\n'

stdout:
len=9
 5c 30 30 30 2e 5c 30 30 30
---
len=8
 30 30 30 2e 5c 30 30 30
len=8
 30 30 30 2e 5c 30 30 30
len=8
 5c 30 30 30 2e 5c 30 30
len=8
 5c 30 30 30 2e 5c 30 30
stderr:
brush12 Strip ops # ## % %% with NUL bytes

[brush stdout] Expected 'len=1\n 2e\n---\nlen=0\nlen=0\nlen=0\nlen=0\n', got 'len=3\n 00 2e 00\n---\nlen=2\n 2e 00\nlen=2\n 2e 00\nlen=2\n 00 2e\nlen=2\n 00 2e\n'

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

[toysh stdout] Expected 'len=1\n 78\nlen=0\n---\nlen=2\n 01 78\nlen=1\n 78\n' Got 'len=0\nlen=16\n 28 70 72 69 6e 74 66 20 27 5c 30 30 30 78 27 29\n---\nlen=2\n 01 78\nlen=1\n 78\n'

stdout:
len=0
len=16
 28 70 72 69 6e 74 66 20 27 5c 30 30 30 78 27 29
---
len=2
 01 78
len=1
 78
stderr:
sush13 Issue 2269 Reduction

[sush stdout] Expected 'len=1\n 78\nlen=0\n---\nlen=2\n 01 78\nlen=1\n 78\n' Got 'len=5\n 5c 30 30 30 78\nlen=4\n 30 30 30 78\n---\nlen=5\n 5c 30 30 31 78\nlen=4\n 30 30 31 78\n'

stdout:
len=5
 5c 30 30 30 78
len=4
 30 30 30 78
---
len=5
 5c 30 30 31 78
len=4
 30 30 31 78
stderr:
brush13 Issue 2269 Reduction

[brush stdout] Expected 'len=1\n 78\nlen=0\n---\nlen=2\n 01 78\nlen=1\n 78\n' Got 'len=2\n 00 78\nlen=1\n 78\n---\nlen=2\n 01 78\nlen=1\n 78\n'

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

[toysh stdout] Expected 'escaped that\'"\'"\'s it!\nthat\'s it!\n---\nescaped ::\n' Got ''
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush14 Issue 2269 - Do NUL bytes match ? in ${a#?}

[sush stdout] Expected 'escaped that\'"\'"\'s it!\nthat\'s it!\n---\nescaped ::\n' Got 'escaped \n\n---\nescaped \n'

stdout:
escaped 

---
escaped 
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: Unexpected token: do

len=0
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 12: Unexpected token: done

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 13: Unexpected token: }

/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 14: escape_arg: command not found
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 25: escape_arg: command not found
brush14 Issue 2269 - Do NUL bytes match ? in ${a#?}

[brush stdout] Expected 'escaped that\'"\'"\'s it!\nthat\'s it!\n---\nescaped ::\n' Got 'escaped that\'"\'"\'s it!\nthat\'s it!\n---\nescaped :\x00:\n'

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