Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/test_cfg.c
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2008-01-16 21:43:34 +0100
committerArthur de Jong <arthur@arthurdejong.org>2008-01-16 21:43:34 +0100
commitb8e3c4fcb398e6de768d62b542442f1ec7a2ded6 (patch)
treefb423b322257cb952ebb95378bd66c6adaa93d98 /tests/test_cfg.c
parent4a8d3f1f894877d3153f72453cf4a144c17e4f06 (diff)
add a test for the map statement
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@560 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'tests/test_cfg.c')
-rw-r--r--tests/test_cfg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_cfg.c b/tests/test_cfg.c
index 592ce50..9b5d09d 100644
--- a/tests/test_cfg.c
+++ b/tests/test_cfg.c
@@ -195,7 +195,8 @@ static void test_read(void)
"uri ldap://127.0.0.1/\n"
"uri ldap:/// ldaps://127.0.0.1/\n"
"base dc=test, dc=tld\n"
- "base passwd ou=Some People,dc=test,dc=tld\n");
+ "base passwd ou=Some People,dc=test,dc=tld\n"
+ "map\tpasswd uid\t\tsAMAccountName\n");
fclose(fp);
/* parse the file */
cfg_defaults(&cfg);
@@ -210,6 +211,7 @@ static void test_read(void)
assert(cfg.ldc_uris[3]==NULL);
assertstreq(cfg.ldc_base,"dc=test, dc=tld");
assertstreq(passwd_base,"ou=Some People,dc=test,dc=tld");
+ assertstreq(attmap_passwd_uid,"sAMAccountName");
/* remove temporary file */
remove("temp.cfg");
}