diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-11-13 22:13:11 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-11-13 22:15:59 +0100 |
commit | ecdb81e159a29c92351bc51c3556a760074f7473 (patch) | |
tree | f7113a1036729caab5fef32fd783b7b984b91898 /tests | |
parent | db32c281dd8c74b938119048d63090e84fb4ebe0 (diff) | |
download | gnu-guix-ecdb81e159a29c92351bc51c3556a760074f7473.tar gnu-guix-ecdb81e159a29c92351bc51c3556a760074f7473.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-download.sh | 6 |
1 files changed, 6 insertions, 0 deletions
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 |