From 635555f6767a264788b0f84f75f9843bc21af86c Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 1 Apr 2014 23:03:43 +0200 Subject: [PATCH] parser_test: Added simple LOOKUP parser tests. --- t/frontend/parser_test.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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; -- 2.30.2