summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5250cae)
raw | patch | inline | side by side (parent: 5250cae)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Mar 2015 15:24:35 +0000 (16:24 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 1 Mar 2015 15:24:35 +0000 (16:24 +0100) |
t/unit/frontend/parser_test.c | patch | blob | history |
index c35ea4e658b1c82be983ceb311baee8f4daabbb9..599ffe5088e9cc06b8fce8df51081b9b92ab4f42 100644 (file)
{ "LOOKUP hosts MATCHING "
"backend = ['a','b']", -1, 1, SDB_CONNECTION_LOOKUP },
+ /* array iteration */
+ { "LOOKUP hosts MATCHING "
+ "'foo' IN backend", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "['foo','bar'] "
+ "IN backend ", -1, 1, SDB_CONNECTION_LOOKUP },
+ /* attribute type is unknown */
+ { "LOOKUP hosts MATCHING "
+ "attribute['backend'] "
+ "IN backend ", -1, 1, SDB_CONNECTION_LOOKUP },
+ /* type mismatch */
+ { "LOOKUP hosts MATCHING "
+ "1 IN backend ", -1, -1, 0 },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend < 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend <= 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend = 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend != 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend >= 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend > 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend =~ 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ANY backend !~ 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend < 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend <= 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend = 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend != 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend >= 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend > 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend =~ 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ { "LOOKUP hosts MATCHING "
+ "ALL backend !~ 'b'", -1, 1, SDB_CONNECTION_LOOKUP },
+ /* attribute type is unknown */
+ { "LOOKUP hosts MATCHING "
+ "ANY backend = attribute['backend']",
+ -1, 1, SDB_CONNECTION_LOOKUP },
+ /* type mismatch */
+ { "LOOKUP hosts MATCHING "
+ "ANY backend = 1", -1, -1, 0 },
+
/* valid operand types */
{ "LOOKUP hosts MATCHING "
"age * 1 > 0s", -1, 1, SDB_CONNECTION_LOOKUP },