aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-17 15:48:27 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-17 15:48:27 +0200
commitc0eeccbc2486572de1ef88249c63bc71c28dfef6 (patch)
treea265eb0b77b3b876844662da5bc9b32c549209e0 /tests/packages.scm
parent56501d3b1727cbafed25be4268c4e6c9387088d9 (diff)
parenta1b484654af07303813a215d4e04c0e4e7b199e5 (diff)
downloadpatches-c0eeccbc2486572de1ef88249c63bc71c28dfef6.tar
patches-c0eeccbc2486572de1ef88249c63bc71c28dfef6.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 94e8150b75..d3f432ada2 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -21,6 +21,7 @@
#:use-module (guix store)
#:use-module (guix monads)
#:use-module (guix grafts)
+ #:use-module ((guix gexp) #:select (local-file local-file-file))
#:use-module ((guix utils)
;; Rename the 'location' binding to allow proper syntax
;; matching when setting the 'location' field of a package.
@@ -295,6 +296,20 @@
(and (direct-store-path? source)
(string-suffix? "utils.scm" source))))
+(test-assert "package-source-derivation, local-file"
+ (let* ((file (local-file "../guix/base32.scm"))
+ (package (package (inherit (dummy-package "p"))
+ (source file)))
+ (source (package-source-derivation %store
+ (package-source package))))
+ (and (store-path? source)
+ (string-suffix? "base32.scm" source)
+ (valid-path? %store source)
+ (equal? (call-with-input-file source get-bytevector-all)
+ (call-with-input-file
+ (search-path %load-path "guix/base32.scm")
+ get-bytevector-all)))))
+
(unless (network-reachable?) (test-skip 1))
(test-equal "package-source-derivation, snippet"
"OK"