summaryrefslogtreecommitdiff
path: root/tests/boot-parameters.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-30 20:18:55 +0200
committerMarius Bakke <marius@gnu.org>2022-08-30 20:18:55 +0200
commit59c136ef611b7a00683af1d1bb406dbd1af1a2bd (patch)
tree1ab434580130c7fd11b8ef5c22a91087b8401559 /tests/boot-parameters.scm
parenta6f42953626df657041fddfc36a207b06c38f944 (diff)
parentd62fc2cc837b095ff1a633ae2639513ea3253596 (diff)
Merge branch 'staging' into core-updates
Diffstat (limited to 'tests/boot-parameters.scm')
-rw-r--r--tests/boot-parameters.scm23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm
index 8e48e1775e..03a1d01aff 100644
--- a/tests/boot-parameters.scm
+++ b/tests/boot-parameters.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
+;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -303,4 +304,26 @@
(operating-system-boot-parameters %default-operating-system
%default-root-device)))
+(define %uuid-menu-entry
+ (menu-entry
+ (label "test")
+ (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc"))
+ (linux "/boot/bzImage")
+ (initrd "/boot/initrd.cpio.gz")))
+
+(define %file-system-label-menu-entry
+ (menu-entry
+ (label "test")
+ (device (file-system-label "test-label"))
+ (linux "/boot/bzImage")
+ (initrd "/boot/initrd.cpio.gz")))
+
+(test-equal "menu-entry roundtrip, uuid"
+ %uuid-menu-entry
+ (sexp->menu-entry (menu-entry->sexp %uuid-menu-entry)))
+
+(test-equal "menu-entry roundtrip, file-system-label"
+ %file-system-label-menu-entry
+ (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry)))
+
(test-end "boot-parameters")