aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-18 23:56:07 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-18 23:56:07 +0100
commit0b8749b7bdd68c9b28cf3d520b9a3a9cc1a5bddb (patch)
treeb8d49b94aa148a63d3dbf320aeeff15364b9abdc /tests
parentac5de156ae5de8cb61870469863fb862b6a1205e (diff)
downloadgnu-guix-0b8749b7bdd68c9b28cf3d520b9a3a9cc1a5bddb.tar
gnu-guix-0b8749b7bdd68c9b28cf3d520b9a3a9cc1a5bddb.tar.gz
packages: 'package-field-location' returns a relative file name.
* guix/packages.scm (package-field-location): Set %FILE-PORT-NAME-CANONICALIZATION. * tests/packages.scm ("package-field-location, relative file name"): New test.
Diffstat (limited to 'tests')
-rw-r--r--tests/packages.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index b499c380ce..7de3fc2156 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -81,6 +81,12 @@
(list version `(version ,version))))
(not (package-field-location %bootstrap-guile 'does-not-exist)))))
+;; Make sure we don't change the file name to an absolute file name.
+(test-equal "package-field-location, relative file name"
+ (location-file (package-location %bootstrap-guile))
+ (with-fluids ((%file-port-name-canonicalization 'absolute))
+ (location-file (package-field-location %bootstrap-guile 'version))))
+
(test-assert "package-transitive-inputs"
(let* ((a (dummy-package "a"))
(b (dummy-package "b"