From 42602c2b138e88e325b16445e0d97f1246324b5c Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 26 Jan 2008 08:31:15 +0000 Subject: also test map filter and scope configuration options git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@562 ef36b2f9-881f-0410-afb5-c4e39611909c --- tests/test_cfg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_cfg.c b/tests/test_cfg.c index 9b5d09d..9f9be19 100644 --- a/tests/test_cfg.c +++ b/tests/test_cfg.c @@ -183,6 +183,8 @@ static void test_tokenize(void) } extern const char *passwd_base; +extern const char *group_filter; +extern int passwd_scope; static void test_read(void) { @@ -196,7 +198,10 @@ static void test_read(void) "uri ldap:/// ldaps://127.0.0.1/\n" "base dc=test, dc=tld\n" "base passwd ou=Some People,dc=test,dc=tld\n" - "map\tpasswd uid\t\tsAMAccountName\n"); + "map\tpasswd uid\t\tsAMAccountName\n" + "filter group (&(objeclClass=posixGroup)(gid=1*))\n" + "\n" + "scope passwd one\n"); fclose(fp); /* parse the file */ cfg_defaults(&cfg); @@ -212,6 +217,8 @@ static void test_read(void) assertstreq(cfg.ldc_base,"dc=test, dc=tld"); assertstreq(passwd_base,"ou=Some People,dc=test,dc=tld"); assertstreq(attmap_passwd_uid,"sAMAccountName"); + assertstreq(group_filter,"(&(objeclClass=posixGroup)(gid=1*))"); + assert(passwd_scope==LDAP_SCOPE_ONELEVEL); /* remove temporary file */ remove("temp.cfg"); } -- cgit v1.2.3