summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-07-18 14:14:33 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-07-18 14:14:33 -0400
commit49d31d419c90065c9889955ce42b8555e43ca27d (patch)
tree9e7245d8aed3861480e4c6347c586cafc28690d4
parentca58dff781a0da2bae04cccb40965deab30447be (diff)
downloadbfs-49d31d419c90065c9889955ce42b8555e43ca27d.tar.xz
tests: Don't pass NUL bytes to sort
The tests now pass with busybox instead of coreutils.
-rw-r--r--tests/test_exec_flush.outbin310 -> 310 bytes
-rw-r--r--tests/test_print0.outbin17 -> 16 bytes
-rw-r--r--tests/test_printf_nul.outbin8 -> 16 bytes
-rwxr-xr-xtests/tests.sh16
4 files changed, 11 insertions, 5 deletions
diff --git a/tests/test_exec_flush.out b/tests/test_exec_flush.out
index 7e93fdf..fdd7b16 100644
--- a/tests/test_exec_flush.out
+++ b/tests/test_exec_flush.out
Binary files differ
diff --git a/tests/test_print0.out b/tests/test_print0.out
index ed2b7e8..1347444 100644
--- a/tests/test_print0.out
+++ b/tests/test_print0.out
Binary files differ
diff --git a/tests/test_printf_nul.out b/tests/test_printf_nul.out
index 6833fdd..fdb6c6b 100644
--- a/tests/test_printf_nul.out
+++ b/tests/test_printf_nul.out
Binary files 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() {