From b017dd54d107968d687f1a86989a8ba26347b143 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Mon, 4 Nov 2024 10:43:08 +0100 Subject: [PATCH] testsuite: Ignore line endings when diff'ing results --- testsuite/tools/enumerate | 2 +- testsuite/tools/simplify | 4 ++-- testsuite/tools/simplify-3to4 | 4 ++-- testsuite/tools/validate | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/tools/enumerate b/testsuite/tools/enumerate index 8abd9d67f1..92ded8867a 100755 --- a/testsuite/tools/enumerate +++ b/testsuite/tools/enumerate @@ -25,7 +25,7 @@ for t in ${TESTS[*]}; do cd $OLDPWD - if diff -u "$expected" "$result" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result" > "$diff"; then echo "ok $I $name" rm "$diff" else diff --git a/testsuite/tools/simplify b/testsuite/tools/simplify index 12b4cea8ef..21a792c1e1 100755 --- a/testsuite/tools/simplify +++ b/testsuite/tools/simplify @@ -22,7 +22,7 @@ for t in ${TESTS[*]}; do $GTK_BUILDER_TOOL simplify $t 2>/dev/null >$result - if diff -u "$expected" "$result" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result" > "$diff"; then echo "ok $I $name" rm "$diff" else @@ -35,7 +35,7 @@ for t in ${TESTS[*]}; do cp $t $result2 $GTK_BUILDER_TOOL simplify --replace $result2 2>/dev/null - if diff -u "$expected" "$result2" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result2" > "$diff"; then echo "ok $I $name (--replace)" rm "$diff" else diff --git a/testsuite/tools/simplify-3to4 b/testsuite/tools/simplify-3to4 index 0a97f1afd8..9f0437b3e1 100755 --- a/testsuite/tools/simplify-3to4 +++ b/testsuite/tools/simplify-3to4 @@ -22,7 +22,7 @@ for t in ${TESTS[*]}; do $GTK_BUILDER_TOOL simplify --3to4 $t 2>/dev/null >$result - if diff -u "$expected" "$result" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result" > "$diff"; then echo "ok $I $name" rm "$diff" else @@ -35,7 +35,7 @@ for t in ${TESTS[*]}; do cp $t $result2 $GTK_BUILDER_TOOL simplify --3to4 --replace $result2 2>/dev/null - if diff -u "$expected" "$result2" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result2" > "$diff"; then echo "ok $I $name (--replace)" rm "$diff" else diff --git a/testsuite/tools/validate b/testsuite/tools/validate index 35e3489f1e..3991659bfe 100755 --- a/testsuite/tools/validate +++ b/testsuite/tools/validate @@ -28,7 +28,7 @@ for t in ${TESTS[*]}; do cd $OLDPWD - if diff -u "$expected" "$result" > "$diff"; then + if diff --strip-trailing-cr -u "$expected" "$result" > "$diff"; then echo "ok $I $name" rm "$diff" else