mirror of
https://github.com/torarnv/sparsebundlefs.git
synced 2026-02-26 18:35:50 +01:00
Verify that testcase is a defined function
This commit is contained in:
@@ -112,6 +112,14 @@ function testrunner::run_tests() {
|
||||
exec 4< $test_output_file
|
||||
|
||||
local all_testcases=($(grep "function .*()" $testsuite | grep -o "test_[a-zA-Z_]*"))
|
||||
for testcase_num in "${!all_testcases[@]}"; do
|
||||
testcase="${all_testcases[$testcase_num]}"
|
||||
# Make sure testcase is actually a defined function
|
||||
if ! testrunner::function_declared $testcase; then
|
||||
unset 'all_testcases[testcase_num]'
|
||||
fi
|
||||
done
|
||||
|
||||
local requested_testcases=$testcases
|
||||
if [[ -z $testcases ]]; then
|
||||
testcases=("${all_testcases[@]}")
|
||||
|
||||
Reference in New Issue
Block a user