diff options
| author | Josselin Poiret <dev@jpoiret.xyz> | 2022-08-21 10:41:16 +0200 |
|---|---|---|
| committer | Marius Bakke <marius@gnu.org> | 2022-08-28 23:37:28 +0200 |
| commit | 3294fa2ba451c7d5ef42a5d9fac780877f364bc7 (patch) | |
| tree | 7a98ec6035555aa3f4a158b0184d3857cc4ce4ba /tests | |
| parent | 0811d2cb8dff5de9f535e14726c9874ec2f4a96c (diff) | |
tests: Add test for menu-entry roundtrips as sexps.
* tests/boot-parameters.scm (%uuid-menu-entry,
%file-system-label-menu-entry): New variables.
("menu-entry roundtrip, uuid", "menu-entry roundtrip,
file-system-label"): New tests.
Signed-off-by: Marius Bakke <marius@gnu.org>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/boot-parameters.scm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 8e48e1775ea..03a1d01aff8 100644 --- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com> | 2 | ;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com> |
| 3 | ;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz> | ||
| 3 | ;;; | 4 | ;;; |
| 4 | ;;; This file is part of GNU Guix. | 5 | ;;; This file is part of GNU Guix. |
| 5 | ;;; | 6 | ;;; |
| @@ -303,4 +304,26 @@ | |||
| 303 | (operating-system-boot-parameters %default-operating-system | 304 | (operating-system-boot-parameters %default-operating-system |
| 304 | %default-root-device))) | 305 | %default-root-device))) |
| 305 | 306 | ||
| 307 | (define %uuid-menu-entry | ||
| 308 | (menu-entry | ||
| 309 | (label "test") | ||
| 310 | (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) | ||
| 311 | (linux "/boot/bzImage") | ||
| 312 | (initrd "/boot/initrd.cpio.gz"))) | ||
| 313 | |||
| 314 | (define %file-system-label-menu-entry | ||
| 315 | (menu-entry | ||
| 316 | (label "test") | ||
| 317 | (device (file-system-label "test-label")) | ||
| 318 | (linux "/boot/bzImage") | ||
| 319 | (initrd "/boot/initrd.cpio.gz"))) | ||
| 320 | |||
| 321 | (test-equal "menu-entry roundtrip, uuid" | ||
| 322 | %uuid-menu-entry | ||
| 323 | (sexp->menu-entry (menu-entry->sexp %uuid-menu-entry))) | ||
| 324 | |||
| 325 | (test-equal "menu-entry roundtrip, file-system-label" | ||
| 326 | %file-system-label-menu-entry | ||
| 327 | (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry))) | ||
| 328 | |||
| 306 | (test-end "boot-parameters") | 329 | (test-end "boot-parameters") |
