diff options
Diffstat (limited to 'common/tests')
-rw-r--r-- | common/tests/test-path.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/tests/test-path.c b/common/tests/test-path.c index 0077cd0..a6ba54d 100644 --- a/common/tests/test-path.c +++ b/common/tests/test-path.c @@ -117,6 +117,12 @@ test_expand (void) p11_path_expand ("~/my/path")); check_equals_and_free ("/home/blah", p11_path_expand ("~")); + putenv ("XDG_CONFIG_HOME=/my"); + check_equals_and_free ("/my/path", + p11_path_expand ("~/.config/path")); + putenv ("XDG_CONFIG_HOME="); + check_equals_and_free ("/home/blah/.config/path", + p11_path_expand ("~/.config/path")); #else /* OS_WIN32 */ putenv ("HOME=C:\\Users\\blah"); check_equals_and_free ("C:\\Users\\blah\\path", |