gnu: services: Name xorg tests.

* tests/services/xorg.scm: Name tests.

Change-Id: I7be7438a69a5d55d5904c3b76a2888393291b6bb
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Ian Eure 2025-12-31 10:22:03 -08:00 committed by Efraim Flashner
parent 7d4db1a37c
commit 68e9cb0d21
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -59,15 +59,13 @@
(xorg-configuration
(keyboard-layout (keyboard-layout "us" #:options '("ctrl:esc")))))
;; Later keyboard layouts replace earlier defaults
(test-equal
(test-equal "later keyboard layouts replace earlier defaults"
(keyboard-layout "us" #:options '("ctrl:nocaps"))
(xorg-configuration-keyboard-layout
(merge-xorg-configurations
(list %config-empty %config-xorg-keyboard-layout-1))))
;; Later keyboard layouts replace earlier customizations.
(test-equal
(test-equal "later keyboard layouts replace earlier customizations"
(keyboard-layout "us" #:options '("ctrl:esc"))
(xorg-configuration-keyboard-layout
(merge-xorg-configurations (list %config-empty
@ -110,15 +108,13 @@
(inherit %config-custom-server-2)
(server-arguments %custom-server-2-arguments)))
;; Custom server is prioritized over earlier default.
(test-equal
(test-equal "custom server is prioritized over earlier default"
%custom-server-1
(xorg-configuration-server
(merge-xorg-configurations (list %config-empty
%config-custom-server-1))))
;; Custom server preserves arguments.
(test-equal
(test-equal "custom server preserves arguments"
(list %custom-server-1 %custom-server-1-arguments)
(let ((cfg (merge-xorg-configurations
(list
@ -127,8 +123,7 @@
(list (xorg-configuration-server cfg)
(xorg-configuration-server-arguments cfg))))
;; Later custom arguments replace earlier.
(test-equal
(test-equal "later custom arguments replace earlier"
(list %custom-server-2 %custom-server-2-arguments)
(let ((cfg (merge-xorg-configurations
(list
@ -138,15 +133,13 @@
(list (xorg-configuration-server cfg)
(xorg-configuration-server-arguments cfg))))
;; Custom server is prioritized over later default.
(test-equal
(test-equal "custom server is prioritized over later default"
%custom-server-1
(xorg-configuration-server
(merge-xorg-configurations (list %config-custom-server-1
%config-empty))))
;; Custom arguments are prioritized over earlier custom server.
(test-equal
(test-equal "custom arguments are prioritized over earlier custom server"
%custom-server-2-arguments
(xorg-configuration-server-arguments
(merge-xorg-configurations
@ -154,29 +147,27 @@
(xorg-configuration (server %custom-server-1))
(xorg-configuration (server-arguments %custom-server-2-arguments))))))
;; Later custom servers are prioritized over earlier.
(test-equal
(test-equal "later custom servers are prioritized over earlier 1/3"
%custom-server-2
(xorg-configuration-server
(merge-xorg-configurations (list %config-custom-server-1
%config-empty
%config-custom-server-2))))
(test-equal
(test-equal "later custom servers are prioritized over earlier 2/3"
%custom-server-2
(xorg-configuration-server
(merge-xorg-configurations (list %config-empty
%config-custom-server-1
%config-custom-server-2))))
(test-equal
(test-equal "later custom servers are prioritized over earlier 3/3"
%custom-server-1
(xorg-configuration-server
(merge-xorg-configurations (list %config-empty
%config-custom-server-1))))
;; Make sure it works in the context of an operating-system.
(test-equal
(test-equal "in the context of an operating-system"
%custom-server-2
(let ((os (operating-system
(host-name "test")
@ -208,10 +199,9 @@
;; extra-config tests.
;; Extra configurations append.
(let ((snippet-one "# First")
(snippet-two "# Second"))
(test-equal
(test-equal "extra configurations append"
(list snippet-one snippet-two)
(xorg-configuration-extra-config
(merge-xorg-configurations
@ -223,7 +213,7 @@
(define %drivers-custom-1 '("done"))
(define %drivers-custom-2 '("dtwo"))
(test-equal
(test-equal "drivers append"
(append %drivers-custom-1 %drivers-custom-2)
(xorg-configuration-drivers
(merge-xorg-configurations