summaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-20 23:51:26 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-20 23:51:26 +0100
commitedae5b3d50692c25e29fe65fdc14ae3ccdce884d (patch)
treeec257af3a922fd96bda8b8b16c00c8d0beaf445a /tests/packages.scm
parent1dba64079c5aaa1fb40e4b1d989f1f06efd6cb63 (diff)
parente3aaefe71bd26daf6fdbfd0634f68a90985e059b (diff)
downloadpatches-edae5b3d50692c25e29fe65fdc14ae3ccdce884d.tar
patches-edae5b3d50692c25e29fe65fdc14ae3ccdce884d.tar.gz
Merge branch 'master' into core-updates
Conflicts: guix/packages.scm
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 8d0d205f54..04e3b0bce9 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"
@@ -122,6 +128,17 @@
(package-source package))))
(string=? file source)))
+(test-assert "package-source-derivation, indirect store path"
+ (let* ((dir (add-to-store %store "guix-build" #t "sha256"
+ (dirname (search-path %load-path
+ "guix/build/utils.scm"))))
+ (package (package (inherit (dummy-package "p"))
+ (source (string-append dir "/utils.scm"))))
+ (source (package-source-derivation %store
+ (package-source package))))
+ (and (direct-store-path? source)
+ (string-suffix? "utils.scm" source))))
+
(test-equal "package-source-derivation, snippet"
"OK"
(let* ((file (search-bootstrap-binary "guile-2.0.9.tar.xz"