mirror of
https://github.com/Yubico/yubico-pam.git
synced 2025-02-22 00:54:30 +01:00
test other case in get_user_cfgfile_path()
This commit is contained in:
parent
f58b225aaa
commit
86ebf13d11
@ -36,8 +36,13 @@
|
|||||||
void test_get_user_cfgfile_path() {
|
void test_get_user_cfgfile_path() {
|
||||||
char *file;
|
char *file;
|
||||||
int ret = get_user_cfgfile_path("/foo/bar", "test", "root", &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);
|
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 */
|
#endif /* HAVE_CR */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user