Code

store_lookup_test: Added a more complex parser/lookup test.
authorSebastian Harl <sh@tokkee.org>
Wed, 9 Apr 2014 16:02:38 +0000 (18:02 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 9 Apr 2014 16:02:38 +0000 (18:02 +0200)
t/core/store_lookup_test.c

index 6365b6b259a101feed4d0f9fded3491e5d28c383..2b52a66de1d32e05d7a79a371c6d095d3eed6fc8 100644 (file)
@@ -466,6 +466,13 @@ START_TEST(test_lookup)
                        "(NOT, HOST\\{ NAME\\{ NULL, \\(nil\\) \\}, SERVICE\\{\\}, ATTR\\{ "
                                        "NAME\\{ 'k1', \\(nil\\) }, VALUE\\{ 'v2', \\(nil\\) \\} "
                                "\\} \\})" },
+               { "attribute.name != 'x' "
+                 "AND attribute.y !~ 'x'", 3,
+                       "\\(AND, \\(NOT, HOST\\{ NAME\\{ NULL, \\(nil\\) \\}, SERVICE\\{\\}, ATTR\\{ "
+                                       "NAME\\{ 'x', \\(nil\\) }, VALUE\\{ NULL, \\(nil\\) \\} "
+                               "\\} \\}\\), \\(NOT, HOST\\{ NAME\\{ NULL, \\(nil\\) \\}, SERVICE\\{\\}, ATTR\\{ "
+                                               "NAME\\{ 'y', \\(nil\\) }, VALUE\\{ NULL, "PTR_RE" \\} "
+                                       "\\} \\}\\)\\)" },
        };
 
        int check, n;