From: Sebastian Harl Date: Sun, 22 Jun 2014 14:06:42 +0000 (+0200) Subject: store_lookup_test: Verify that NULL is not a valid attribute name. X-Git-Tag: sysdb-0.2.0~44 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e4f86c220f168d0d481dc871df74e5a7b0aabb02;p=sysdb.git store_lookup_test: Verify that NULL is not a valid attribute name. --- diff --git a/t/unit/core/store_lookup_test.c b/t/unit/core/store_lookup_test.c index c3f3b51..5c3dc48 100644 --- a/t/unit/core/store_lookup_test.c +++ b/t/unit/core/store_lookup_test.c @@ -203,6 +203,11 @@ START_TEST(test_store_match_attr) fail_unless(obj != NULL, "sdb_store_get_host(a) = NULL; expected: "); + fail_unless(sdb_store_attr_matcher(NULL, "re", 0) == NULL, + "sdb_store_attr_matcher(NULL, \"re\", 0) = ; expected: NULL"); + fail_unless(sdb_store_attr_matcher(NULL, "re", 1) == NULL, + "sdb_store_attr_matcher(NULL, \"re\", 1) = ; expected: NULL"); + for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) { sdb_store_matcher_t *m, *n; char buf[1024];