Restructuring tests

This commit is contained in:
2023-10-03 12:43:34 -05:00
parent b852e514d0
commit dbc22698e2
19 changed files with 124 additions and 144 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/bash
#
# Find that we have tests for each file.
retcode=0
for language in `ls -1 ./HelloWorld.* | cut -f 3 -d '.'`; do
# Ensure there's a test file.
if [ ! -f tests/test_"${language}".py ]; then
echo "${language^} is missing a test file."
retcode=1
else
# Ensure that each test is defined.
if ! grep "^def test_${language}():$" tests/test_"${language}".py &>/dev/null; then
echo "${language^} doesn't have the right test definition."
retcode=1
fi
fi
done
exit $retcode