From 3081cab6cefa149b60bf06d9827ac15c6273e7fa Mon Sep 17 00:00:00 2001 From: Jarell <91372088+jarelllama@users.noreply.github.com> Date: Mon, 1 Apr 2024 21:54:14 +0800 Subject: [PATCH] Test --- functions/test_functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/test_functions.sh b/functions/test_functions.sh index 1f321633f..c9f5ecffa 100644 --- a/functions/test_functions.sh +++ b/functions/test_functions.sh @@ -246,6 +246,7 @@ TEST_BUILD() { domain='build-test.com' printf "%s\n" "$domain" >> "$RAW" cp "$RAW" "$RAW_LIGHT" + touch out.txt # Placeholder run_script build_lists.sh @@ -269,14 +270,14 @@ TEST_BUILD() { # $2: name and directory of format check_list() { # Check regular version - if grep -qxF "$1" "lists/${2}/scams.txt"; then + if ! grep -qxF "$1" "lists/${2}/scams.txt"; then printf "\e[1m[warn] %s format is not as expected:\e[0m\n" "$2" grep -F "$domain" "lists/${2}/scams.txt" error=true fi # Check light version - if grep -qxF "$1" "lists/${2}/scams_light.txt"; then + if ! grep -qxF "$1" "lists/${2}/scams_light.txt"; then printf "\e[1m[warn] %s light format is not as expected:\e[0m\n" "$2" grep -F "$domain" "lists/${2}/scams_light.txt" error=true