- {"ONECHAT_DIR first", filepath.Join(root, "a"), filepath.Join(root, "xdg"), root, filepath.Join(root, "a")},
- {"absolute XDG_DATA_HOME", "", filepath.Join(root, "xdg"), root, filepath.Join(root, "xdg", "onechat")},
- {"relative XDG_DATA_HOME ignored", "", "xdg", root, filepath.Join(root, ".local", "share", "onechat")},
- {"home directory last", "", "", root, filepath.Join(root, ".local", "share", "onechat")},
+ {
+ name: "ONECHAT_DIR first",
+ dir: filepath.Join(root, "a"),
+ xdg: filepath.Join(root, "xdg"),
+ home: root,
+ want: filepath.Join(root, "a"),
+ },
+ {
+ name: "absolute XDG_DATA_HOME",
+ dir: "",
+ xdg: filepath.Join(root, "xdg"),
+ home: root,
+ want: filepath.Join(root, "xdg", "onechat"),
+ },
+ {
+ name: "relative XDG_DATA_HOME ignored",
+ dir: "",
+ xdg: "xdg",
+ home: root,
+ want: filepath.Join(root, ".local", "share", "onechat"),
+ },
+ {
+ name: "home directory last",
+ dir: "",
+ xdg: "",
+ home: root,
+ want: filepath.Join(root, ".local", "share", "onechat"),
+ },