summaryrefslogtreecommitdiff
path: root/tests/bin/wget
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-06-28 12:32:24 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2022-06-28 12:45:08 +0200
commit8b704f5f61933e6749cf6dad25127bc99c1b7681 (patch)
treec179c44c79da42515b3be73a2c899c4ee17fc99d /tests/bin/wget
parentc51ebcb7f5b3f093e6b7bbffcc1213d83f30c86f (diff)
downloadalpine-conf-8b704f5f61933e6749cf6dad25127bc99c1b7681.zip
tests: make fake wget to error on missing/or empty url
Diffstat (limited to 'tests/bin/wget')
-rwxr-xr-xtests/bin/wget5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/bin/wget b/tests/bin/wget
index 5efc612..77144b9 100755
--- a/tests/bin/wget
+++ b/tests/bin/wget
@@ -63,8 +63,13 @@ while true; do
shift
done
+if [ $# -eq 0 ]; then
+ usage "1" >&2
+fi
+
for url; do
case "$url" in
+ "") msg "bad address"; exit 1;;
*fail*) msg "bad address"; exit 1;;
*404*) msg "wget: server returned error: HTTP/1.1 404 Not Found"; exit 1;;
esac