summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd3e376)
raw | patch | inline | side by side (parent: fd3e376)
author | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 07:12:11 +0000 (09:12 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Mon, 23 Jun 2014 07:12:11 +0000 (09:12 +0200) |
Added a unit-test catching that.
src/core/store_lookup.c | patch | blob | history | |
t/unit/core/store_lookup_test.c | patch | blob | history |
index 100942ac8ab652fc21c9d2691e9517ca28564c81..dceab19dd7d99feb1e7fb68982d43fe703567e00 100644 (file)
--- a/src/core/store_lookup.c
+++ b/src/core/store_lookup.c
type = SDB_SERVICE;
else if (! strcasecmp(obj_type, "attribute"))
type = SDB_ATTRIBUTE;
+ else
+ return NULL;
/* TODO: support other operators */
if (! strcasecmp(op, "=")) {
index c125a5913a407c1e177998864d740d1427933d1d..67f2e05cbeff6bf31f301fd938a7b1202bbb92da 100644 (file)
{ "attribute", "attr", "=~", "attrname", MATCHER_ATTR },
{ "attribute", "attr", "!~", "attrname", MATCHER_NOT },
{ "attribute", "attr", "&^", "attrname", -1 },
+ { "foo", "name", "=", "bar", -1 },
+ { "foo", "attr", "=", "bar", -1 },
};
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {