-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from cytopia/release-0.12
Release 0.12
- Loading branch information
Showing
4 changed files
with
87 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Be strict | ||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
|
||
### | ||
### Find exactly 4 unique URLs | ||
### | ||
"${DIR}/../linkcheck" -r 10 -t 30 "${DIR}/urls_valid_4.txt" | ||
echo | ||
|
||
if [ "$( "${DIR}/../linkcheck" -r 10 -t 30 "${DIR}/urls_valid_4.txt" | grep -c "[OK]" )" -eq "4" ]; then | ||
echo "[OK]" | ||
echo | ||
else | ||
>&2 echo "FAILED: Not exactly 4 succeeded URLs found." | ||
exit 1 | ||
fi | ||
|
||
|
||
### | ||
### Find exactly 4 redirecting URLs and fail | ||
### | ||
"${DIR}/../linkcheck" -r 10 -t 30 "${DIR}/urls_redirect_4.txt" || true | ||
echo | ||
|
||
if [ "$( "${DIR}/../linkcheck" -r 10 -t 30 "${DIR}/urls_redirect_4.txt" | grep -c "[ERR]" )" -eq "4" ]; then | ||
echo "[OK]" | ||
echo | ||
else | ||
>&2 echo "FAILED: Not exactly 4 redirecting URLs found." | ||
exit 1 | ||
fi | ||
|
||
|
||
### | ||
### Find exactly 4 redirecting URLs and allow | ||
### | ||
"${DIR}/../linkcheck" -r 10 -t 30 -c '200,301,302' "${DIR}/urls_redirect_4.txt" || true | ||
echo | ||
|
||
if [ "$( "${DIR}/../linkcheck" -r 10 -t 30 -c '200,301,302' "${DIR}/urls_redirect_4.txt" | grep -c "[OK]" )" -eq "4" ]; then | ||
echo "[OK]" | ||
echo | ||
else | ||
>&2 echo "FAILED: Not exactly 4 redirecting URLs found." | ||
exit 1 | ||
fi | ||
|
||
|
||
### | ||
### Find exactly 4 redirecting URLs and follow them | ||
### | ||
"${DIR}/../linkcheck" -l -r 10 -t 30 "${DIR}/urls_redirect_4.txt" | ||
echo | ||
|
||
if [ "$( "${DIR}/../linkcheck" -l -r 10 -t 30 "${DIR}/urls_redirect_4.txt" | grep -c "[OK]" )" -eq "4" ]; then | ||
echo "[OK]" | ||
echo | ||
else | ||
>&2 echo "FAILED: Not exactly 4 redirecting and successfully followed URLs found." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Redirect URLS | ||
https://google.com | ||
https://yahoo.com | ||
https://bing.com | ||
https://www.duckduckgo.com |