1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-20 21:54:16 +01:00

test other case in get_user_cfgfile_path()

This commit is contained in:
Klas Lindfors 2014-08-27 10:00:45 +02:00
parent f58b225aaa
commit 86ebf13d11

View File

@ -36,8 +36,13 @@
void test_get_user_cfgfile_path() {
char *file;
int ret = get_user_cfgfile_path("/foo/bar", "test", "root", &file);
fprintf(stderr, "foo: %s\n", file);
assert(ret == 1);
assert(strcmp(file, "/foo/bar/test") == 0);
free(file);
ret = get_user_cfgfile_path(NULL, "test", "root", &file);
assert(ret == 1);
assert(strcmp(file, "/root/.yubico/test") == 0);
free(file);
}
#endif /* HAVE_CR */