summaryrefslogtreecommitdiffstats
path: root/tests.sh
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-03-15 14:49:38 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-03-15 14:49:38 -0400
commitb5e6b7929d5569f887e682ed81cdaa44aa717082 (patch)
treefa7c71ce43f611facd47ed8309f75aaeb54d65bc /tests.sh
parent5b605d426cd581e87f1d2d8fc2f90bdf78cb3777 (diff)
downloadbfs-b5e6b7929d5569f887e682ed81cdaa44aa717082.tar.xz
tests: Use bfs_diff in more cases
Diffstat (limited to 'tests.sh')
-rwxr-xr-xtests.sh27
1 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
}