diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2021-01-10 11:23:40 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2021-02-01 17:32:31 +0100 |
| commit | b41e21488fa1f10bfb4b9c9899139c4e59149894 (patch) | |
| tree | cdaac782537c09f6c7db7d6ba45827d5d2572341 /tests | |
| parent | 73744725dd0a65cddaa9251f104f17ca27756479 (diff) | |
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.scm | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tests/profiles.scm b/tests/profiles.scm index 2dec42bec11..ce77711d63c 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> | 3 | ;;; Copyright © 2014 Alex Kost <alezost@gmail.com> |
| 4 | ;;; | 4 | ;;; |
| 5 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| @@ -154,6 +154,34 @@ | |||
| 154 | (manifest-entries (manifest-add (manifest '()) | 154 | (manifest-entries (manifest-add (manifest '()) |
| 155 | (list guile-2.0.9 guile-2.0.9)))) | 155 | (list guile-2.0.9 guile-2.0.9)))) |
| 156 | 156 | ||
| 157 | (test-equal "manifest->code, simple" | ||
| 158 | '(begin | ||
| 159 | (specifications->manifest (list "guile" "guile:debug" "glibc"))) | ||
| 160 | (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc)))) | ||
| 161 | |||
| 162 | (test-equal "manifest->code, simple, versions" | ||
| 163 | '(begin | ||
| 164 | (specifications->manifest (list "guile@2.0.9" "guile@2.0.9:debug" | ||
| 165 | "glibc@2.19"))) | ||
| 166 | (manifest->code (manifest (list guile-2.0.9 guile-2.0.9:debug glibc)) | ||
| 167 | #:entry-package-version manifest-entry-version)) | ||
| 168 | |||
| 169 | (test-equal "manifest->code, transformations" | ||
| 170 | '(begin | ||
| 171 | (use-modules (guix transformations)) | ||
| 172 | |||
| 173 | (define transform1 | ||
| 174 | (options->transformation '((foo . "bar")))) | ||
| 175 | |||
| 176 | (packages->manifest | ||
| 177 | (list (transform1 (specification->package "guile")) | ||
| 178 | (specification->package "glibc")))) | ||
| 179 | (manifest->code (manifest (list (manifest-entry | ||
| 180 | (inherit guile-2.0.9) | ||
| 181 | (properties `((transformations | ||
| 182 | . ((foo . "bar")))))) | ||
| 183 | glibc)))) | ||
| 184 | |||
| 157 | (test-assert "manifest-perform-transaction" | 185 | (test-assert "manifest-perform-transaction" |
| 158 | (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug))) | 186 | (let* ((m0 (manifest (list guile-2.0.9 guile-2.0.9:debug))) |
| 159 | (t1 (manifest-transaction | 187 | (t1 (manifest-transaction |
