Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Farley <[email protected]>
  • Loading branch information
adamfarley committed Dec 17, 2024
1 parent 3a7c97a commit 2a5c4bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/tests/functionLibraryTests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# A set of tests for the functionLibrary script

scriptLocation=$0
scriptDir="${scriptLocation%/*}/"
[[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests/$ ]] && scriptDir="./"
scriptDir="${scriptLocation%/*}"
[[ ! -x "${scriptDir}" || ! "${scriptDir}" =~ .*tests$ ]] && scriptDir="."
[[ ! `ls "${scriptDir}/.." | grep functionLibrary.sh` ]] && echo "Error: Please launch this script with a full path, or from within the test directory." && exit 1

source "${scriptDir}/../functionLibrary.sh"
Expand Down Expand Up @@ -59,6 +59,7 @@ function checkFileShaTests(){
# Does it work when it should?
checkFileSha "${sampleFileSha}" "${scriptDir}/${sampleFileName}"
testResults "checkFileShaTest 1" "$?"
echo "checkFileSha ${sampleFileSha} ${scriptDir}/${sampleFileName}"

# Does it fail when we have the wrong sha?
checkFileSha "12345" "${scriptDir}/${sampleFileName}" &> /dev/null
Expand Down

0 comments on commit 2a5c4bd

Please sign in to comment.