From 772897a1cd46fc3875f0ffa54cf2661d9ef17494 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Fri, 26 Jan 2024 10:08:56 -0800 Subject: [PATCH] Color `diff` output in `tests/functional/lang` tests Use `diff --color=always` to print colored output for language test failures. I've also flipped the arguments so that expected lines missing from the actual output will be marked with a red `-` and additional lines found in the actual output will be marked with a green `+`. Previously it was the other way around, which was very confusing. --- tests/functional/lang/framework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/lang/framework.sh b/tests/functional/lang/framework.sh index 516bff8ad..9b886e983 100644 --- a/tests/functional/lang/framework.sh +++ b/tests/functional/lang/framework.sh @@ -16,7 +16,7 @@ function diffAndAcceptInner() { fi # Diff so we get a nice message - if ! diff --unified "$got" "$expectedOrEmpty"; then + if ! diff --color=always --unified "$expectedOrEmpty" "$got"; then echo "FAIL: evaluation result of $testName not as expected" badDiff=1 fi