Allow for executing a specific set of tests on the command line

This commit is contained in:
Andrew Kesterson
2025-11-12 07:48:17 -05:00
parent 24b9903957
commit 791c9c40f0

View File

@@ -35,7 +35,12 @@ for file in $FILES;
do do
declare -A tests declare -A tests
source $file source $file
for key in $(declare -F | grep 'shunittest_') if [[ "${cmdarg_argv[@]}" == "" ]]; then
keys=$(declare -F | grep shunittest_ | sort)
else
keys=$(echo ${cmdarg_argv[*]} | tr ' ' '\n' | sort)
fi
for key in ${keys}
do do
if [[ "$(type -t $key)" == "function" ]]; then if [[ "$(type -t $key)" == "function" ]]; then
start=$(date "+%s") start=$(date "+%s")