aboutsummaryrefslogtreecommitdiff
path: root/tests/guix-download.sh
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2017-08-19 20:41:44 +0800
committer宋文武 <iyzsong@member.fsf.org>2017-08-20 20:55:45 +0800
commita02967d77af03d6468e25d6e26dbea0db919ce96 (patch)
tree66ca3cdddb4ccbb37a0f053fcbd9af95ca1f0e30 /tests/guix-download.sh
parent6d7d9d9507484773eff697a01f422ea984936373 (diff)
downloadpatches-a02967d77af03d6468e25d6e26dbea0db919ce96.tar
patches-a02967d77af03d6468e25d6e26dbea0db919ce96.tar.gz
guix download: Support retrieving local file without the URI scheme.
* guix/scripts/download.scm (guix-download): Treat the URL argument as a local file path when it fails on 'string->uri'. Call 'fetch' with the processed 'uri' instead of the original URL argument. * tests/guix-download.sh: Adjust accordingly.
Diffstat (limited to 'tests/guix-download.sh')
-rw-r--r--tests/guix-download.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/guix-download.sh b/tests/guix-download.sh
index ebc853c7fa..30f55fbe2b 100644
--- a/tests/guix-download.sh
+++ b/tests/guix-download.sh
@@ -29,12 +29,15 @@ then false; else true; fi
if guix download unknown://some/where;
then false; else true; fi
-if guix download not/a/uri;
+if guix download /does-not-exist
then false; else true; fi
# This one should succeed.
guix download "file://$abs_top_srcdir/README"
+# And this one, without the URI scheme.
+guix download "$abs_top_srcdir/README"
+
# This one too, even if it cannot talk to the daemon.
output="t-download-$$"
trap 'rm -f "$output"' EXIT