diff --git a/lib/tests/functionLibraryTests.sh b/lib/tests/functionLibraryTests.sh index 8b5e8b9dc..9196a3420 100644 --- a/lib/tests/functionLibraryTests.sh +++ b/lib/tests/functionLibraryTests.sh @@ -16,7 +16,11 @@ scriptLocation=$0 scriptDir="${scriptLocation%/*}/" +[[ ! -x "${scriptDir}" ]] && echo "D1: ${scriptDir}" +[[ ! "${scriptDir}" =~ .*tests/$ ]] && echo "D2: ${scriptDir}" +[[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests/$ ]] && echo "D3: ${scriptDir}" [[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests/$ ]] && scriptDir="./" +[[ ! -x "${scriptDir}/../functionLibrary.sh" ]] && echo "D4: ${scriptDir}" [[ ! -x "${scriptDir}/../functionLibrary.sh" ]] && echo "Error: Please launch this script with a full path, or from within the test directory." && exit 1 source "${scriptDir}/../functionLibrary.sh"