-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestFunctions.sh
More file actions
31 lines (26 loc) · 808 Bytes
/
testFunctions.sh
File metadata and controls
31 lines (26 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env bash
. ./bashFunctionLibrary.sh
# Test the checkPassword function
echo "Testing checkPassword function"
testPassword="Test1234$%^"
if checkPassword "$testPassword"; then
echo "checkPassword: Password is valid"
else
echo "checkPassword: Password is invalid"
fi
# Invalid test password
testPassword="Test1234&"
if checkPassword "$testPassword"; then
echo "Password is valid"
else
echo "Password is invalid"
fi
# test the prepScript.sh script
files=("bashFunctionLibrary.sh" "bashFunctionLibrary.sh")
destination="fullScript.sh"
./prepScript.sh "${files[@]}" "$destination"
echo "Testing the prepScript.sh script"
echo " Check the $destination file to see if it was created and has the correct contents"
echo " Press any key to continue"
read -r -s -n 1
rm -f "$destination"