aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-12-31 14:10:25 +0200
committerEfraim Flashner <efraim@flashner.co.il>2017-12-31 14:10:25 +0200
commit23de2e1d5f8f7548e6f73085de23d9964774edbf (patch)
treefab69d4bb55f275f14012a724b7cb14bd307b57f /tests
parentec6ba5c1fe9308cbc18f06c99adcfe0d13396a18 (diff)
parent1c27f72fc2770d68243dd95b7c05adc3b2b02ea4 (diff)
downloadguix-23de2e1d5f8f7548e6f73085de23d9964774edbf.tar
guix-23de2e1d5f8f7548e6f73085de23d9964774edbf.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts-build.scm29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/scripts-build.scm b/tests/scripts-build.scm
index a408ea6f8d..190426ed06 100644
--- a/tests/scripts-build.scm
+++ b/tests/scripts-build.scm
@@ -96,6 +96,35 @@
(string-contains (get-output-string port)
"had no effect"))))))
+(test-assert "options->transformation, with-source, PKG=URI"
+ (let* ((p (dummy-package "foo"))
+ (s (search-path %load-path "guix.scm"))
+ (f (string-append "foo=" s))
+ (t (options->transformation `((with-source . ,f)))))
+ (with-store store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (string=? (package-name new) (package-name p))
+ (string=? (package-version new)
+ (package-version p))
+ (string=? (package-source new)
+ (add-to-store store (basename s) #t
+ "sha256" s)))))))
+
+(test-assert "options->transformation, with-source, PKG@VER=URI"
+ (let* ((p (dummy-package "foo"))
+ (s (search-path %load-path "guix.scm"))
+ (f (string-append "foo@42.0=" s))
+ (t (options->transformation `((with-source . ,f)))))
+ (with-store store
+ (let ((new (t store p)))
+ (and (not (eq? new p))
+ (string=? (package-name new) (package-name p))
+ (string=? (package-version new) "42.0")
+ (string=? (package-source new)
+ (add-to-store store (basename s) #t
+ "sha256" s)))))))
+
(test-assert "options->transformation, with-input"
(let* ((p (dummy-package "guix.scm"
(inputs `(("foo" ,(specification->package "coreutils"))