1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-13 04:21:08 +01:00

gnome-terminal: add assertion on profile names

This commit is contained in:
Robert Helgesson 2023-07-29 19:01:04 +02:00
parent 5c23226768
commit f58889c07e
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 48 additions and 2 deletions

View file

@ -0,0 +1,25 @@
{ config, ... }:
{
programs.gnome-terminal = {
enable = true;
profile = {
bad-name = { visibleName = "a"; };
"e0b782ed-6aca-44eb-8c75-62b3706b6220" = {
default = true;
visibleName = "b";
};
another-bad-name = { visibleName = "c"; };
};
};
nixpkgs.overlays = [
(self: super: { gnome.gnome-terminal = config.lib.test.mkStubPackage { }; })
];
test.stubs.dconf = { };
test.asserts.assertions.expected = [''
The attribute name of a Gnome Terminal profile must be a UUID.
Incorrect profile names: another-bad-name, bad-name''];
}

View file

@ -1 +1,4 @@
{ gnome-terminal-1 = ./gnome-terminal-1.nix; }
{
gnome-terminal-1 = ./gnome-terminal-1.nix;
gnome-terminal-bad-profile-name = ./bad-profile-name.nix;
}