Code

store: Let NULL values never match a regex.
[sysdb.git] / t / unit / core / store_lookup_test.c
index c5aad2c51f3670cd6f469d7650de349d6504a56a..0b81ebd0bab70dd35f7bb4a172c5a953c4ab73c9 100644 (file)
@@ -797,6 +797,11 @@ START_TEST(test_scan)
                        "NOT attribute['x'] = ''",         2 }, /* filter always matches */
                { "attribute = 'x'", NULL,             0 },
                { "attribute['k1'] = 'v1'", NULL,      1 },
+               { "attribute['k1'] =~ 'v'", NULL,      2 },
+               { "attribute['k1'] !~ 'v'", NULL,      1 },
+               { "attribute['x1'] =~ 'v'", NULL,      0 },
+               { "attribute['x1'] =~ 'NULL'", NULL,   0 },
+               { "attribute['x1'] !~ 'v'", NULL,      3 },
                { "attribute['k1'] IS NULL", NULL,     1 },
                { "attribute['x1'] IS NULL", NULL,     3 },
                { "attribute['k1'] IS NOT NULL", NULL, 2 },