From 15630e3eaabd4eecc234cb98c3fc582b7a167bd7 Mon Sep 17 00:00:00 2001 From: Akuli Date: Mon, 19 Feb 2024 17:17:36 +0200 Subject: [PATCH] Move DIFF --- runtests.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtests.sh b/runtests.sh index 9133de38..e711ba48 100755 --- a/runtests.sh +++ b/runtests.sh @@ -79,6 +79,11 @@ if [ $run_make = yes ]; then fi +DIFF=$(which gdiff || which diff) +if $DIFF --help | grep -q -- --color; then + diff_color="--color=always" +fi + rm -rf tmp/tests mkdir -p tmp/tests @@ -213,11 +218,6 @@ function run_test() printf "\n\n\x1b[33m*** Command: %s ***\x1b[0m\n\n" "$command" > $diffpath - DIFF=$(which gdiff || which diff) - if $DIFF --help | grep -q -- --color; then - diff_color="--color=always" - fi - if $DIFF --text -u $diff_color <( generate_expected_output $joufile $correct_exit_code | tr -d '\r' ) <(