diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2010-10-15 10:21:35 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2010-10-15 10:21:35 +0000 |
commit | e6100f8a81d178f1307571a5773931dd976986c2 (patch) | |
tree | 8a0a6e43f8539bc9de93c8f127452d46db24627b /tests/test_set.c | |
parent | 3128e988fa37671c3ca8b81f235d3e4a505aa256 (diff) |
make DICTs and SETs case-sensitive
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1278 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'tests/test_set.c')
-rw-r--r-- | tests/test_set.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/test_set.c b/tests/test_set.c index 2623906..7adaf21 100644 --- a/tests/test_set.c +++ b/tests/test_set.c @@ -2,7 +2,7 @@ test_set.c - simple test for the set module This file is part of the nss-pam-ldapd library. - Copyright (C) 2008, 2009 Arthur de Jong + Copyright (C) 2008, 2009, 2010 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -44,21 +44,22 @@ int main(int UNUSED(argc),char UNUSED(*argv[])) set_add(set,"key1"); set_add(set,"key2"); set_add(set,"key3"); - set_add(set,"KEY2"); + set_add(set,"key2"); /* check set contents */ - assert(set_contains(set,"KeY1")); - assert(set_contains(set,"kEy2")); - assert(set_contains(set,"KeY3")); + assert(set_contains(set,"key1")); + assert(set_contains(set,"key2")); + assert(set_contains(set,"key3")); assert(!set_contains(set,"key4")); + assert(!set_contains(set,"KEY1")); /* loop over set contents */ list=set_tolist(set); for (i=0;list[i]!=NULL;i++) { - assert( (strcasecmp(list[i],"key1")==0) || - (strcasecmp(list[i],"key2")==0) || - (strcasecmp(list[i],"key3")==0) ); + assert( (strcmp(list[i],"key1")==0) || + (strcmp(list[i],"key2")==0) || + (strcmp(list[i],"key3")==0) ); } /* free set */ |