From acc9b04d2cf0417a81d5f6d98e24adcad9c9dcc3 Mon Sep 17 00:00:00 2001 From: Mario Carneiro Date: Tue, 8 Feb 2022 23:06:22 -0800 Subject: [PATCH] fix color codes on windows (#63) --- tests/run_test.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/run_test.sh b/tests/run_test.sh index 95afeb5b..a9998985 100755 --- a/tests/run_test.sh +++ b/tests/run_test.sh @@ -48,11 +48,12 @@ if ! [ -x "$(command -v "$cmd")" ]; then fi # color codes -red='\033[0;31m' -green='\033[0;32m' -cyan='\033[0;36m' -white='\033[0;37m' -off='\033[0m' +escape=$(printf '\033') +red="$escape[0;31m" +green="$escape[0;32m" +cyan="$escape[0;36m" +white="$escape[0;97m" +off="$escape[0m" # set to 1 if any test fails exit_code=0