Add some tests for the "drop wrong anchored optimization". Without
the previous commit, the first, fifth and seventh of these would fail,
i.e. those:
{ "xby", "^a|b", 1},
{ "", "x*$", 1},
{ "yy", "x*$", 1},
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
{ "x23", "^\\d+$", 0},
{ "banana", "^([bn]a)*$", 1},
{ "panama", "^([bn]a)*$", 0},
+ { "xby", "^a|b", 1},
+ { "xby", "b|^a", 1},
+ { "xby", "b|c$", 1},
+ { "xby", "c$|b", 1},
+ { "", "x*$", 1},
+ { "", "^x*$", 1},
+ { "yy", "x*$", 1},
+ { "yy", "^x*$", 0},
{}
};