From ecdb81e159a29c92351bc51c3556a760074f7473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 13 Nov 2012 22:13:11 +0100 Subject: guix-download: Gracefully handle invalid URIs. * guix-download.in (guix-download): Error out when `string->uri' returns #f. Use `leave' when the scheme is unknown. * tests/guix-download.sh: Add tests. --- tests/guix-download.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/guix-download.sh') diff --git a/tests/guix-download.sh b/tests/guix-download.sh index 74ef48ba4b..fc7b35d1b3 100644 --- a/tests/guix-download.sh +++ b/tests/guix-download.sh @@ -25,3 +25,9 @@ guix-download --version # Make sure it fails here. if guix-download http://www.example.com/does-not-exist then false; else true; fi + +if guix-download unknown://some/where; +then false; else true; fi + +if guix-download not/a/uri; +then false; else true; fi -- cgit v1.2.3