From 0e6e91d04846e8d61a26d17bc80a3c85cadd98a2 Mon Sep 17 00:00:00 2001 From: Eldred Habert Date: Sun, 12 Apr 2026 19:23:51 +0200 Subject: [PATCH] Avoid copying RGBFIX binary when testing it (#1933) This is just cleaner in general, and also avoids separating it from any DLLs it may be needing. --- test/fix/test.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/fix/test.sh b/test/fix/test.sh index f69ea988..61fbdcc6 100755 --- a/test/fix/test.sh +++ b/test/fix/test.sh @@ -3,15 +3,13 @@ export LC_ALL=C tmpdir="$(mktemp -d)" - -cp ../../{rgbfix,contrib/gbdiff.bash} "$tmpdir" -src="$PWD" -cd "$tmpdir" || exit - # Immediate expansion is the desired behavior. # shellcheck disable=SC2064 trap "cd; rm -rf ${tmpdir@Q}" EXIT +src="$PWD" +cd "$tmpdir" || exit + if which cygpath &>/dev/null; then # MinGW needs the Windows path substituted but with forward slash separators; # Cygwin has `cygpath` but just needs the original path substituted. @@ -32,7 +30,7 @@ red="$(tput setaf 1)" green="$(tput setaf 2)" rescolors="$(tput op)" -RGBFIX=./rgbfix +RGBFIX="$src/../../rgbfix" tryDiff () { if ! diff -au --strip-trailing-cr "$1" "$2"; then @@ -43,7 +41,7 @@ tryDiff () { tryCmp () { if ! cmp "$1" "$2"; then - ./gbdiff.bash "$1" "$2" + "$src/../../gbdiff.bash" "$1" "$2" echo "${bold}${red}${3:-$1} mismatch!${rescolors}${resbold}" false fi