diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-06-10 03:02:39 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-06-10 03:02:39 -0400 |
commit | a3faa73f03a4d539de4c808d1a4f3b8ebc5ce537 (patch) | |
tree | f64b21a1459e4b9774cd27a888dd66a1ec0cdce6 /tests.sh | |
parent | a6c25c7c74f762cb40639da0b9b98bfcf3f4c590 (diff) | |
download | bfs-a3faa73f03a4d539de4c808d1a4f3b8ebc5ce537.tar.xz |
printf: Fix embedded nul bytes
Fixes #26.
Diffstat (limited to 'tests.sh')
-rwxr-xr-x | tests.sh | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -302,6 +302,7 @@ gnu_tests=( test_printf_escapes test_printf_times test_printf_leak + test_printf_nul test_quit_after_print test_quit_before_print test_fstype @@ -1036,6 +1037,11 @@ function test_printf_leak() { bfs_diff basic -maxdepth 0 -printf '%p' } +function test_printf_nul() { + # NUL byte regression test + bfs_diff basic -printf '%h\0%f\n' +} + function test_fstype() { fstype="$($BFS -printf '%F\n' | head -n1)" bfs_diff basic -fstype "$fstype" |