From 8b704f5f61933e6749cf6dad25127bc99c1b7681 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 28 Jun 2022 12:32:24 +0200 Subject: tests: make fake wget to error on missing/or empty url --- tests/bin/wget | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/bin/wget') 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 -- cgit v1.2.3