summaryrefslogtreecommitdiff
path: root/test/lib/slre.c
AgeCommit message (Collapse)Author
2025-05-29test: slre: add tests for character rangesRasmus Villemoes
The first of these, { "U-Boot", "^[B-Uo-t]*$", 0 }, would match previously when the - and the letters were all interpreted literally. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2025-05-29test: slre: add test cases for escape char in character classRasmus Villemoes
Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2025-05-29test: slre: add some (negative) character class testsRasmus Villemoes
Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2025-05-29test: slre: add more test casesRasmus Villemoes
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 <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>
2025-05-29test: slre: add tests for regex libraryRasmus Villemoes
Inspecting the slre.c code reveals a few bugs; those are easy to demonstrate with the new '=~' test operator. Before fixing them, let's add a place to add test cases. Reviewed-by: Simon Glass <[email protected]> Signed-off-by: Rasmus Villemoes <[email protected]>