From 0ac0167344d260190a59cae84aeac45490baee33 Mon Sep 17 00:00:00 2001 From: Mitchell Krog Date: Sun, 23 Jun 2019 12:37:17 +0200 Subject: [PATCH] Improve Test Coloring --- .dev-tools/test-blocker.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.dev-tools/test-blocker.sh b/.dev-tools/test-blocker.sh index ccb0984da..e3e93daef 100755 --- a/.dev-tools/test-blocker.sh +++ b/.dev-tools/test-blocker.sh @@ -258,6 +258,8 @@ fi run_curltest15 bold=$(tput bold) +red=$(tput setaf 1) +green=$(tput setaf 2) # ************************************************ # Test 100 Random User-Agents from Bad-User-Agents # ************************************************ @@ -273,9 +275,9 @@ lines=$(cat ${file}) for line in ${lines}; do if curl -v -A "${line}" http://localhost:9000 2>&1 | grep -i '(52)'; then - echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was BLOCKED - $(tput setaf 2)TEST PASSED" + echo "${bold}${green}PASSED - ${red}${line} was BLOCKED" else - echo "${bold}$(tput setaf 1)${line} $(tput setaf 1)was NOT BLOCKED - ${bold}$(tput setaf 1)TEST FAILED" + echo "${bold}${red}FAILED - ${red}${line} was NOT BLOCKED" fi done IFS=""