Skip to content

Commit fd9cce2

Browse files
committed
fix
1 parent 75e40ec commit fd9cce2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

usr/libexec/helper-scripts/strings.bsh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,11 @@ strings_bsh_error_trap() {
398398

399399
## Useful in case this script is copied verbatim into another script such as
400400
## in package 'usability-misc' file 'dist-installer-cli-standalone'.
401-
if should_run_unit_tests "${BASH_SOURCE[0]}"; then
402-
string_bsh_tests
401+
## Another option would be to move the unit testing out of this script.
402+
if declare -F should_run_unit_tests >/dev/null; then
403+
if should_run_unit_tests "${BASH_SOURCE[0]}"; then
404+
string_bsh_tests
405+
fi
403406
fi
404407

405408
#trim_collapse_split " aaa bbb ccc ddd "

0 commit comments

Comments
 (0)