From e4f86c220f168d0d481dc871df74e5a7b0aabb02 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 22 Jun 2014 16:06:42 +0200 Subject: [PATCH] store_lookup_test: Verify that NULL is not a valid attribute name. --- t/unit/core/store_lookup_test.c | 5 +++++ 1 file changed, 5 insertions(+) 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]; -- 2.30.2