aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-01-10 11:23:40 +0100
committerLudovic Courtès <ludo@gnu.org>2021-02-01 17:32:31 +0100
commitb41e21488fa1f10bfb4b9c9899139c4e59149894 (patch)
treecdaac782537c09f6c7db7d6ba45827d5d2572341 /tests
parent73744725dd0a65cddaa9251f104f17ca27756479 (diff)
downloadguix-b41e21488fa1f10bfb4b9c9899139c4e59149894.tar
guix-b41e21488fa1f10bfb4b9c9899139c4e59149894.tar.gz
profiles: Add 'manifest->code'.
* guix/profiles.scm (manifest->code): New procedure. * tests/profiles.scm ("manifest->code, simple") ("manifest->code, simple, versions") ("manifest->code, transformations"): New tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/profiles.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm
index 2dec42bec1..ce77711d63 100644
--- a/tests/profiles.scm
+++ b/tests/profiles.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -154,6 +154,34 @@
(manifest-entries (manifest-add (manifest '())
(list guile-2.0.9 guile-2.0.9))))
+(test-equal "manifest->code, simple"
+ '(begin
+ (specifications->manifest (list "guile" "guile:debug" "glibc")))
+ (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc))))
+
+(test-equal "manifest->code, simple, versions"
+ '(begin
+ (specifications->manifest (list "guile@2.0.9" "guile@2.0.9:debug"
+ "glibc@2.19")))
+ (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc))
+ #:entry-package-version manifest-entry-version))
+
+(test-equal "manifest->code, transformations"
+ '(begin
+ (use-modules (guix transformations))
+
+ (define transform1
+ (options->transformation '((foo . "bar"))))
+
+ (packages->manifest
+ (list (transform1 (specification->package "guile"))
+ (specification->package "glibc"))))
+ (manifest->code (manifest (list (manifest-entry
+ (inherit guile-2.0.9)
+ (properties `((transformations
+ . ((foo . "bar"))))))
+ glibc))))
+
(test-assert "manifest-perform-transaction"
(let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug)))
(t1 (manifest-transaction