Skip to content

Commit

Permalink
chore(test): 🧹 now the test runner can run a unique test file
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Villard <[email protected]>
  • Loading branch information
eviweb committed Apr 25, 2022
1 parent 984d783 commit c3cb3ee
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions tests/run
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@ lib_dir()

. "$(lib_dir)"/functions

for testfile in "$(tests_dir)"/*-test; do
. "${testfile}"
echo -e "\n----------\n"
done
if [ -z "$1" ]; then
for testfile in "$(tests_dir)"/*-test; do
. "${testfile}"
echo -e "\n----------\n"
done
else
if [ -e "$1" ]; then
. "$1"
echo -e "\n----------\n"
else
echo "File not found: $1"
exit 1
fi
fi

PASSED="$((TESTS - ERRORS))"
echo -e "${PASSED} passed tests / ${TESTS} tests - ${ERRORS} errors."

0 comments on commit c3cb3ee

Please sign in to comment.