summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-24 14:37:09 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-24 14:37:09 -0400
commit2b72ce2ac0908dae4a39d30b91a28106928168b0 (patch)
treed69c28483103eb221f88aaac781490e3a46c2155
parentc2fee54077be069eb666621b006635580826d2a4 (diff)
downloadbfs-2b72ce2ac0908dae4a39d30b91a28106928168b0.tar.xz
tests: Make diff listen to $NO_COLOR
-rw-r--r--tests/run.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/run.sh b/tests/run.sh
index 381b03e..8c1402d 100644
--- a/tests/run.sh
+++ b/tests/run.sh
@@ -416,8 +416,8 @@ make_xattrs() {
EX_DIFF=20
# Detect colored diff support
-if diff --color /dev/null /dev/null &>/dev/null; then
- DIFF="diff --color"
+if ((COLOR_STDERR)) && diff --color=always /dev/null /dev/null &>/dev/null; then
+ DIFF="diff --color=always"
else
DIFF="diff"
fi