diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2022-06-28 12:32:24 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2022-06-28 12:45:08 +0200 |
commit | 8b704f5f61933e6749cf6dad25127bc99c1b7681 (patch) | |
tree | c179c44c79da42515b3be73a2c899c4ee17fc99d /tests/bin/wget | |
parent | c51ebcb7f5b3f093e6b7bbffcc1213d83f30c86f (diff) | |
download | alpine-conf-8b704f5f61933e6749cf6dad25127bc99c1b7681.zip |
tests: make fake wget to error on missing/or empty url
Diffstat (limited to 'tests/bin/wget')
-rwxr-xr-x | tests/bin/wget | 5 |
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 |