X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Funit%2Fparser%2Fparser_test.c;h=f9049211440c513c342ce6c3769c7f160f8767bf;hp=68e152740368d029ba9dd3ad96acb5be9cd7c81d;hb=bc864220dfdef478fc644dbf0bfe4af40f90e8b0;hpb=195f73cdb0c1087bf3f3a82267204fca9eb3104c diff --git a/t/unit/parser/parser_test.c b/t/unit/parser/parser_test.c index 68e1527..f904921 100644 --- a/t/unit/parser/parser_test.c +++ b/t/unit/parser/parser_test.c @@ -409,8 +409,13 @@ struct { * syntactically correct but semantically invalid commands */ -#if 0 /* invalid fields */ + { "LIST hosts FILTER " + "field = 'a'", -1, -1, 0, 0 }, + { "LIST services FILTER " + "field = 'a'", -1, -1, 0, 0 }, + { "LIST metrics FILTER " + "field = 'a'", -1, -1, 0, 0 }, { "LIST hosts FILTER " "value = 'a'", -1, -1, 0, 0 }, { "LIST services FILTER " @@ -449,6 +454,7 @@ struct { "age + 1 > 0s", -1, -1, 0, 0 }, { "LOOKUP hosts MATCHING " "age - 1 > 0s", -1, -1, 0, 0 }, + /* datetime integer is allowed */ { "LOOKUP hosts MATCHING " "age || 1 > 0s", -1, -1, 0, 0 }, @@ -595,7 +601,6 @@ struct { "2015-02-01", -1, -1, 0, 0 }, { "STORE metric attribute " "'metric'.'key' 123", -1, -1, 0, 0 }, -#endif }; START_TEST(test_parse)