Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Apr 1, 2024
1 parent 46ee4db commit 3081cab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/test_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 3081cab

Please sign in to comment.