summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 722e33e)
raw | patch | inline | side by side (parent: 722e33e)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 27 Feb 2015 18:32:55 +0000 (19:32 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 27 Feb 2015 18:32:55 +0000 (19:32 +0100) |
t/unit/frontend/parser_test.c | patch | blob | history |
index 43d10ddd0048b9c4663213bf11db84c4957d915d..4926f7662271cf21459bd886631b93cf64ddbdf5 100644 (file)
{ "LOOKUP hosts MATCHING "
"backend = ['a','b']", -1, 1, SDB_CONNECTION_LOOKUP },
+ /* valid operand types */
+ { "LOOKUP hosts MATCHING "
+ "age * 1 > 0s", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "age / 1 > 0s", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name > ''", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name >= ''", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name != ''", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name = ''", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name <= ''", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "name < ''", -1, 1, SDB_CONNECTION_LOOKUP },
+
/* NULL */
{ "LOOKUP hosts MATCHING "
"attribute['foo'] "
{ "LOOKUP hosts MATCHING "
"attr['foo'] IS NULL", -1, -1, 0 },
+ /* type mismatches */
+ { "LOOKUP hosts MATCHING "
+ "age > 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age >= 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age = 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age != 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age <= 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age < 0", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age + 1 > 0s", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "age - 1 > 0s", -1, -1, 0 },
+ /* datetime <mul/div> integer is allowed */
+ { "LOOKUP hosts MATCHING "
+ "age || 1 > 0s", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "name + 1 = ''", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "name - 1 = ''", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "name * 1 = ''", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "name / 1 = ''", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "name % 1 = ''", -1, -1, 0 },
+
/* comments */
{ "/* some comment */", -1, 0, 0 },
{ "-- another comment", -1, 0, 0 },