fontconfig: check warning in legacy default test

This commit is contained in:
Benedikt Rips
2026-06-18 14:16:03 -05:00
committed by Austin Horstman
parent a786067676
commit 82432731d3
3 changed files with 30 additions and 19 deletions
+1 -1
View File
@@ -9,5 +9,5 @@
fontconfig-extra-config-files = ./extra-config-files.nix;
fontconfig-fonts = ./fonts.nix;
fontconfig-old-default-configFile-toggle = ./old-default-configFile-toggle.nix;
fontconfig-legacy-default-configFile-toggle = ./legacy-default-configFile-toggle.nix;
}
@@ -0,0 +1,29 @@
let
fcConfD = "home-files/.config/fontconfig/conf.d";
in
{
home.stateVersion = "26.05"; # <= 26.11
fonts.fontconfig = {
enable = true;
configFile.implicitly-disabled.text = "foo";
};
asserts.warning.expected = [
''
The default value of `fonts.fontconfig.configFile.implicitly-disabled.enable` has changed from `false` to `true`.
You are currently using the legacy default (`false`) because `home.stateVersion` is less than "26.11".
To silence this warning and keep legacy behavior, set:
fonts.fontconfig.configFile.implicitly-disabled.enable = false;
To adopt the new default behavior, set:
fonts.fontconfig.configFile.implicitly-disabled.enable = true;
''
];
nmt.script = ''
assertFileExists ${fcConfD}/10-hm-fonts.conf
assertFileExists ${fcConfD}/52-hm-default-fonts.conf
assertPathNotExists ${fcConfD}/90-hm-implicitly-disabled.conf
'';
}
@@ -1,18 +0,0 @@
let
fcConfD = "home-files/.config/fontconfig/conf.d";
in
{
home.stateVersion = "26.05"; # <= 26.11
fonts.fontconfig = {
enable = true;
configFile.implicitly-disabled.text = "foo";
};
nmt.script = ''
assertFileExists ${fcConfD}/10-hm-fonts.conf
assertFileExists ${fcConfD}/52-hm-default-fonts.conf
assertPathNotExists ${fcConfD}/90-hm-implicitly-disabled.conf
'';
}