Skip to content

Commit

Permalink
count total number of tests, and success message
Browse files Browse the repository at this point in the history
  • Loading branch information
vmikk committed Oct 21, 2024
1 parent b04d153 commit a8959f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/test2_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

set -euo pipefail

# Initialize a variable to track test failures
# Initialize variables to track test failures and total tests
failed=0
total_tests=0

# Test basic usage
function test_basic_usage {
Expand All @@ -17,11 +18,12 @@ ACTG
AAAA
EOF
)
((total_tests++))
if [[ "$result" != "$expected" ]]; then
echo -e "\e[31m'Basic usage' test failed\e[0m"
failed=1
((failed++))
else
echo -e "\e[32mBasic usage test passed\e[0m"
echo -e "\e[32m'Basic usage' test passed\e[0m"
fi
}

Expand Down

0 comments on commit a8959f4

Please sign in to comment.