tests/xdg-user-dirs-*: do not use 'PROJECTS'

Use `XDG_CUSTOM_DIR` instead, as it is unlikely to be added to the spec.
This commit is contained in:
Bruno BELANYI
2026-04-20 00:08:02 -05:00
committed by Austin Horstman
parent 1ab3a4b78e
commit 12ceb3974a
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -10,7 +10,7 @@
xdg.userDirs = {
enable = true;
extraConfig.PROJECTS = "${config.home.homeDirectory}/Projects";
extraConfig.CUSTOM = "${config.home.homeDirectory}/Custom";
## This will trigger a warning.
extraConfig.XDG_MISC_DIR = "${config.home.homeDirectory}/Misc";
};
@@ -19,13 +19,13 @@
configFile=home-files/.config/user-dirs.dirs
assertFileExists $configFile
assertFileContent $configFile ${pkgs.writeText "expected" ''
XDG_CUSTOM_DIR="/home/hm-user/Custom"
XDG_DESKTOP_DIR="/home/hm-user/Desktop"
XDG_DOCUMENTS_DIR="/home/hm-user/Documents"
XDG_DOWNLOAD_DIR="/home/hm-user/Downloads"
XDG_MISC_DIR="/home/hm-user/Misc"
XDG_MUSIC_DIR="/home/hm-user/Music"
XDG_PICTURES_DIR="/home/hm-user/Pictures"
XDG_PROJECTS_DIR="/home/hm-user/Projects"
XDG_PUBLICSHARE_DIR="/home/hm-user/Public"
XDG_TEMPLATES_DIR="/home/hm-user/Templates"
XDG_VIDEOS_DIR="/home/hm-user/Videos"
+2 -2
View File
@@ -8,19 +8,19 @@
config = {
xdg.userDirs = {
enable = true;
extraConfig.PROJECTS = "${config.home.homeDirectory}/Projects";
extraConfig.CUSTOM = "${config.home.homeDirectory}/Custom";
};
nmt.script = ''
configFile=home-files/.config/user-dirs.dirs
assertFileExists $configFile
assertFileContent $configFile ${pkgs.writeText "expected" ''
XDG_CUSTOM_DIR="/home/hm-user/Custom"
XDG_DESKTOP_DIR="/home/hm-user/Desktop"
XDG_DOCUMENTS_DIR="/home/hm-user/Documents"
XDG_DOWNLOAD_DIR="/home/hm-user/Downloads"
XDG_MUSIC_DIR="/home/hm-user/Music"
XDG_PICTURES_DIR="/home/hm-user/Pictures"
XDG_PROJECTS_DIR="/home/hm-user/Projects"
XDG_PUBLICSHARE_DIR="/home/hm-user/Public"
XDG_TEMPLATES_DIR="/home/hm-user/Templates"
XDG_VIDEOS_DIR="/home/hm-user/Videos"