From e391dbc92815ef1c709bebdb639dfe252a3c41e3 Mon Sep 17 00:00:00 2001 From: Luke Ceddia Date: Mon, 24 Jun 2024 21:03:40 +1000 Subject: [PATCH] Try harder to ignore CR characters --- tests/format_tests.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/format_tests.sh b/tests/format_tests.sh index 58fce9a47..e18f12384 100755 --- a/tests/format_tests.sh +++ b/tests/format_tests.sh @@ -34,8 +34,7 @@ show_failure() show_incorrect_result() { - printf "EXPECTED: '%s'\n" "$1" - printf "GOT: '%s'\n" "$2" + diff -u <(echo -n "$1") <(echo -n "$2") } @@ -52,7 +51,7 @@ do TESTCASE="$category/$testName/$variant" output="$RESULTS_DIR/$category-$testName-$variant-output" compileResultOutput="$RESULTS_DIR/$category-$testName-$variant-compile_result.txt" - expectedResult="$(cat "tests/format_tests/$category/$variant")" + expectedResult="$(< "tests/format_tests/$category/$variant" tr -d '\r')" compilerFlags=("${map[@]:1}") pushd . >/dev/null cd "tests/format_tests/$category"