From b5e6b7929d5569f887e682ed81cdaa44aa717082 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 15 Mar 2022 14:49:38 -0400 Subject: tests: Use bfs_diff in more cases --- tests.sh | 27 +++++---------------------- tests/test_print0.out | Bin 16 -> 17 bytes 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/tests.sh b/tests.sh index 73c78f1..b407f68 100755 --- a/tests.sh +++ b/tests.sh @@ -2568,18 +2568,7 @@ function test_color_escapes() { } function test_color_nul() { - local EXPECTED="$TESTS/${FUNCNAME[0]}.out" - if [ "$UPDATE" ]; then - local ACTUAL="$EXPECTED" - else - local ACTUAL="$TMP/${FUNCNAME[0]}.out" - fi - - LS_COLORS="ec=\33[m\0:" invoke_bfs rainbow -color -maxdepth 0 >"$ACTUAL" - - if [ ! "$UPDATE" ]; then - $DIFF -u "$EXPECTED" "$ACTUAL" - fi + LS_COLORS="ec=\33[m\0:" bfs_diff rainbow -color -maxdepth 0 } function test_color_ln_target() { @@ -2868,13 +2857,7 @@ function test_fprint_error_stderr() { } function test_print0() { - invoke_bfs basic/a basic/b -print0 >scratch/test_print0.out - - if [ "$UPDATE" ]; then - cp scratch/test_print0.out "$TESTS/test_print0.out" - else - cmp -s scratch/test_print0.out "$TESTS/test_print0.out" - fi + bfs_diff basic/a basic/b -print0 } function test_fprint0() { @@ -3212,12 +3195,12 @@ function test_Ofast() { } function test_S() { - invoke_bfs -S "$1" -s basic >"$TMP/test_S_$1.out" + invoke_bfs -S "$1" -s basic >"scratch/test_S_$1.out" if [ "$UPDATE" ]; then - cp {"$TMP","$TESTS"}/"test_S_$1.out" + cp {scratch,"$TESTS"}/"test_S_$1.out" else - $DIFF -u {"$TESTS","$TMP"}/"test_S_$1.out" + $DIFF -u {"$TESTS",scratch}/"test_S_$1.out" fi } diff --git a/tests/test_print0.out b/tests/test_print0.out index 1347444..ed2b7e8 100644 Binary files a/tests/test_print0.out and b/tests/test_print0.out differ -- cgit v1.2.3