summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c63a274)
raw | patch | inline | side by side (parent: c63a274)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 5 Apr 2014 18:20:13 +0000 (20:20 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 5 Apr 2014 18:20:13 +0000 (20:20 +0200) |
t/frontend/parser_test.c | patch | blob | history |
index 212bfe1d44d4d47356b8b775d34ce47be39eb351..4b177328c084483edc1c74d7e167cf89533a8db3 100644 (file)
--- a/t/frontend/parser_test.c
+++ b/t/frontend/parser_test.c
{ "LIST;", -1, 1, CONNECTION_LIST },
{ "LIST; INVALID", 5, 1, CONNECTION_LIST },
- { "LOOKUP hosts "
- "WHERE 'host'", -1, 1, CONNECTION_LOOKUP },
+ { "LOOKUP hosts WHERE "
+ "host.name = 'host'", -1, 1, CONNECTION_LOOKUP },
/* comments */
{ "/* some comment */", -1, 0, 0 },
{ "/* some incomplete", -1, -1, 0 },
{ "LOOKUP hosts", -1, -1, 0 },
- { "LOOKUP invalid "
- "WHERE 'host'", -1, -1, 0 },
+ { "LOOKUP foo WHERE "
+ "host.name = 'host'", -1, -1, 0 },
};
size_t i;
int expected;
} golden_data[] = {
/* empty expressions */
- { NULL, -1, -1 },
- { "", -1, -1 },
+ { NULL, -1, -1 },
+ { "", -1, -1 },
/* valid expressions */
- { "'localhost'", -1, 0 },
- { "'localhost' -- foo", -1, 0 },
- { "'host' <garbage>", 6, 0 },
+ { "host.name = 'localhost'", -1, 0 },
+ { "host.name = 'localhost' -- foo", -1, 0 },
+ { "host.name = 'host' <garbage>", 18, 0 },
/* syntax errors */
- { "LIST", -1, -1 },
- { "foo &^ bar", -1, -1 },
+ { "LIST", -1, -1 },
+ { "foo &^ bar", -1, -1 },
};
size_t i;