From: Sebastian Harl Date: Tue, 1 Apr 2014 21:03:43 +0000 (+0200) Subject: parser_test: Added simple LOOKUP parser tests. X-Git-Tag: sysdb-0.1.0~155 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=635555f6767a264788b0f84f75f9843bc21af86c parser_test: Added simple LOOKUP parser tests. --- diff --git a/t/frontend/parser_test.c b/t/frontend/parser_test.c index 8a2b2d5..212bfe1 100644 --- a/t/frontend/parser_test.c +++ b/t/frontend/parser_test.c @@ -51,11 +51,14 @@ START_TEST(test_parse) { ";;", -1, 0, 0 }, /* valid commands */ - { "FETCH 'host'", -1, 1, CONNECTION_FETCH }, - { "LIST", -1, 1, CONNECTION_LIST }, - { "LIST -- comment", -1, 1, CONNECTION_LIST }, - { "LIST;", -1, 1, CONNECTION_LIST }, - { "LIST; INVALID", 5, 1, CONNECTION_LIST }, + { "FETCH 'host'", -1, 1, CONNECTION_FETCH }, + { "LIST", -1, 1, CONNECTION_LIST }, + { "LIST -- comment", -1, 1, CONNECTION_LIST }, + { "LIST;", -1, 1, CONNECTION_LIST }, + { "LIST; INVALID", 5, 1, CONNECTION_LIST }, + + { "LOOKUP hosts " + "WHERE 'host'", -1, 1, CONNECTION_LOOKUP }, /* comments */ { "/* some comment */", -1, 0, 0 }, @@ -66,6 +69,10 @@ START_TEST(test_parse) { "FETCH host", -1, -1, 0 }, { "LIST; INVALID", 8, -1, 0 }, { "/* some incomplete", -1, -1, 0 }, + + { "LOOKUP hosts", -1, -1, 0 }, + { "LOOKUP invalid " + "WHERE 'host'", -1, -1, 0 }, }; size_t i;