want string
}{
{
- name: "ONECHAT_DIR first",
+ name: "uses ONECHAT_DIR before other paths",
dir: filepath.Join(root, "a"),
xdg: filepath.Join(root, "xdg"),
home: root,
want: filepath.Join(root, "a"),
},
{
- name: "absolute XDG_DATA_HOME",
+ name: "uses absolute XDG_DATA_HOME without ONECHAT_DIR",
dir: "",
xdg: filepath.Join(root, "xdg"),
home: root,
want: filepath.Join(root, "xdg", "onechat"),
},
{
- name: "relative XDG_DATA_HOME ignored",
+ name: "ignores relative XDG_DATA_HOME",
dir: "",
xdg: "xdg",
home: root,
want: filepath.Join(root, ".local", "share", "onechat"),
},
{
- name: "home directory last",
+ name: "falls back to the home data directory",
dir: "",
xdg: "",
home: root,