diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-03-15 14:49:38 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-03-15 14:49:38 -0400 |
commit | b5e6b7929d5569f887e682ed81cdaa44aa717082 (patch) | |
tree | fa7c71ce43f611facd47ed8309f75aaeb54d65bc | |
parent | 5b605d426cd581e87f1d2d8fc2f90bdf78cb3777 (diff) | |
download | bfs-b5e6b7929d5569f887e682ed81cdaa44aa717082.tar.xz |
tests: Use bfs_diff in more cases
-rwxr-xr-x | tests.sh | 27 | ||||
-rw-r--r-- | tests/test_print0.out | bin | 16 -> 17 bytes |
2 files changed, 5 insertions, 22 deletions
@@ -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 Binary files differindex 1347444..ed2b7e8 100644 --- a/tests/test_print0.out +++ b/tests/test_print0.out |