aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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"))
Famulari 2021-06-29pack: Factorize base tar options....Maxim Cournoyer 2021-06-25build: Build guix.scm and gnu.scm....Ludovic Courtès 2021-06-23build: Makefile splits Scheme compilation in four steps....Ludovic Courtès 2021-06-07etc: Add "bordeaux.guix.gnu.org.pub" public key file....Christopher Baines 2021-06-03import: Add CHICKEN egg importer....Xinglu Chen 2021-05-21gnu: linux-libre: Update to 5.12.5....Leo Famulari 2021-05-15tests: Conditionally include tests/go.scm....Maxim Cournoyer 2021-05-11Merge branch 'version-1.3.0'Maxim Cournoyer 2021-05-08gnu: Add linux-libre 5.12.2....Leo Famulari 2021-05-08services: configuration: Add tests....Maxim Cournoyer 2021-05-05build: Do not compress the (already compressed) VM qcow2 images....Maxim Cournoyer 2021-05-05maint: Remove a workaround in Makefile.am....Maxim Cournoyer 2021-05-03maint: Do not xz-compress ISO images....Ludovic Courtès 2021-05-03build: Replace the doc-po-update prerequisite by doc-pot-update....Maxim Cournoyer 2021-05-03Makefile: Reimplement `download-po` target....Julien Lepiller 2021-05-01Makefile: Reimplement `download-po` target....Julien Lepiller 2021-04-29build: Have the release target depend on 'all'....Maxim Cournoyer 2021-04-29build: Add the qcow2 file extension to the VM image....Maxim Cournoyer 2021-04-29build: Update and add new comments for the release target....Maxim Cournoyer 2021-04-29Makefile.am: Remove the GUIX_FOR_BINARY_TARBALL variable....Maxim Cournoyer 2021-04-25import: Remove Nix importer....Ludovic Courtès 2021-04-23build: Use guix system image instead of disk-image, vm-image....Maxim Cournoyer 2021-04-23build: Add doc-update-po as a prerequisite to the dist target....Maxim Cournoyer 2021-04-20import: Remove Nix importer....Ludovic Courtès 2021-04-12Add (guix ipfs)....Ludovic Courtès 2021-03-23Add powerpc64le-linux as a supported Guix architecture....Chris Marusich 2021-03-10import: Add Go importer....Katherine Cox-Buday 2021-03-10ci: Remove hydra support....Mathieu Othacehe 2021-03-05guix: Split (guix substitutes) from (guix scripts substitute)....Christopher Baines