From 49d31d419c90065c9889955ce42b8555e43ca27d Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 18 Jul 2022 14:14:33 -0400 Subject: tests: Don't pass NUL bytes to sort The tests now pass with busybox instead of coreutils. --- tests/test_exec_flush.out | Bin 310 -> 310 bytes tests/test_print0.out | Bin 17 -> 16 bytes tests/test_printf_nul.out | Bin 8 -> 16 bytes tests/tests.sh | 16 +++++++++++----- 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_exec_flush.out b/tests/test_exec_flush.out index 7e93fdf..fdd7b16 100644 Binary files a/tests/test_exec_flush.out and b/tests/test_exec_flush.out differ diff --git a/tests/test_print0.out b/tests/test_print0.out index ed2b7e8..1347444 100644 Binary files a/tests/test_print0.out and b/tests/test_print0.out differ diff --git a/tests/test_printf_nul.out b/tests/test_printf_nul.out index 6833fdd..fdb6c6b 100644 Binary files a/tests/test_printf_nul.out and b/tests/test_printf_nul.out differ diff --git a/tests/tests.sh b/tests/tests.sh index dce421a..786a16e 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -1808,7 +1808,9 @@ function test_exec_substring() { function test_exec_flush() { # IO streams should be flushed before executing programs - bfs_diff basic -print0 -exec echo found \; + invoke_bfs basic -print0 -exec echo found \; | tr '\0' ' ' >"$OUT" + sort_output + diff_output } function test_exec_flush_fail() { @@ -1828,7 +1830,8 @@ function test_exec_flush_fprint_fail() { } function test_exec_plus_flush() { - bfs_diff basic/a -print0 -exec echo found {} + + invoke_bfs basic/a -print0 -exec echo found {} + >"$OUT" + diff_output } function test_exec_plus_flush_fail() { @@ -2423,7 +2426,8 @@ function test_printf_leak() { function test_printf_nul() { # NUL byte regression test - bfs_diff basic -maxdepth 0 -printf '%h\0%f\n' + invoke_bfs basic/a basic/b -maxdepth 0 -printf '%h\0%f\n' >"$OUT" + diff_output } function test_printf_w() { @@ -2608,7 +2612,8 @@ function test_color_escapes() { } function test_color_nul() { - LS_COLORS="ec=\33[m\0:" bfs_diff rainbow -color -maxdepth 0 + LS_COLORS="ec=\33[m\0:" invoke_bfs rainbow -color -maxdepth 0 >"$OUT" + diff_output } function test_color_ln_target() { @@ -2888,7 +2893,8 @@ function test_fprint_error_stderr() { } function test_print0() { - bfs_diff basic/a basic/b -print0 + invoke_bfs basic/a basic/b -print0 >"$OUT" + diff_output } function test_fprint0() { -- cgit v1.2.3