diff options
Diffstat (limited to 'src')
| -rwxr-xr-x | src/main.sh | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/main.sh b/src/main.sh index cb0e334..efd154b 100755 --- a/src/main.sh +++ b/src/main.sh @@ -24,18 +24,20 @@ _test_run_file() { for test_file; do source "$_script_dir/test.sh" - local lib_file - find "$tests_dir/lib" \ - -mindepth 1 \ - -maxdepth 1 \ - -type f \ - -name '*.sh' \ - -print0 \ - | sort -z \ - | \ - while IFS= read -d '' -r lib_file; do - source "$lib_file" - done + if [ -d "$tests_dir/lib" ]; then + local lib_file + find "$tests_dir/lib" \ + -mindepth 1 \ + -maxdepth 1 \ + -type f \ + -name '*.sh' \ + -print0 \ + | sort -z \ + | \ + while IFS= read -d '' -r lib_file; do + source "$lib_file" + done + fi source "$tests_dir/$test_file" |
