diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-23 14:42:24 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2007-07-23 14:42:24 +0000 |
commit | 14514d2217f770a3a3baefacaa59acf75ad351dd (patch) | |
tree | 459b8f46d3ca80e8fd5a68523358e418b66f89f7 /tests | |
parent | c1bd1e7559b5f40e6dbeedcb7608ac10a7989818 (diff) |
add support for removing entries from a DICT by setting the value to NULL (this does not free any memory)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@313 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/dict/test_dict.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dict/test_dict.c b/tests/dict/test_dict.c index 0524a1b..df1aeff 100644 --- a/tests/dict/test_dict.c +++ b/tests/dict/test_dict.c @@ -56,6 +56,11 @@ int main(int UNUSED(argc),char UNUSED(*argv[])) assert(ret==dict); ret=dict_get(dict,"key4"); assert(ret==NULL); + + /* remove a key */ + dict_put(dict,"kEy3",NULL); + ret=dict_get(dict,"keY3"); + assert(ret==NULL); /* free dictionary */ dict_free(dict); |