Code

store_lookup: Catch invalid values when parsing a matcher.
[sysdb.git] / t / unit / core / store_lookup_test.c
index 351ae18da7dfd899c918c897da267503597d644b..43bb1e53d7746bcc4689895be686f5eeacd04aff 100644 (file)
@@ -421,6 +421,7 @@ START_TEST(test_parse_cmp)
                { "host",      NULL,   "<=", &hostname, -1 },
                { "host",      NULL,   ">=", &hostname, -1 },
                { "host",      NULL,   ">",  &hostname, -1 },
+               { "host",      NULL,   "=",  NULL,      -1 },
                { "service",   NULL,   "=",  &srvname,  MATCHER_NAME },
                { "service",   NULL,   "!=", &srvname,  MATCHER_NOT },
                { "service",   NULL,   "=~", &srvname,  MATCHER_NAME },
@@ -432,6 +433,7 @@ START_TEST(test_parse_cmp)
                { "service",   NULL,   "<=", &srvname,  -1 },
                { "service",   NULL,   ">=", &srvname,  -1 },
                { "service",   NULL,   ">",  &srvname,  -1 },
+               { "service",   NULL,   "=",  NULL,      -1 },
                { "attribute", NULL,   "=",  &attrname, MATCHER_NAME },
                { "attribute", NULL,   "!=", &attrname, MATCHER_NOT },
                { "attribute", NULL,   "=~", &attrname, MATCHER_NAME },
@@ -440,11 +442,13 @@ START_TEST(test_parse_cmp)
                { "attribute", NULL,   "<=", &attrname, -1 },
                { "attribute", NULL,   ">=", &attrname, -1 },
                { "attribute", NULL,   ">",  &attrname, -1 },
+               { "attribute", NULL,   "=",  NULL,      -1 },
                { "attribute", "attr", "=",  &attrname, MATCHER_ATTR },
                { "attribute", "attr", "!=", &attrname, MATCHER_NOT },
                { "attribute", "attr", "=~", &attrname, MATCHER_ATTR },
                { "attribute", "attr", "!~", &attrname, MATCHER_NOT },
                { "attribute", "attr", "&^", &attrname, -1 },
+               { "attribute", "attr", "<",  NULL,      -1 },
                { "attribute", "attr", "<",  &attrname, MATCHER_LT },
                { "attribute", "attr", "<=", &attrname, MATCHER_LE },
 /*             { "attribute", "attr", "=",  &attrname, MATCHER_EQ }, */