[PATCH v2 09/12] test: slre: add test cases for escape char in character class

Rasmus Villemoes ravi at prevas.dk
Tue May 13 10:40:31 CEST 2025


Reviewed-by: Simon Glass <sjg at chromium.org>
Signed-off-by: Rasmus Villemoes <ravi at prevas.dk>
---
 test/lib/slre.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/lib/slre.c b/test/lib/slre.c
index 9b41ea92f38..053d046075e 100644
--- a/test/lib/slre.c
+++ b/test/lib/slre.c
@@ -26,6 +26,9 @@ static const struct re_test re_test[] = {
 	{ "Gadsby", "^[^eE]*$", 1},
 	{ "Ernest", "^[^eE]*$", 0},
 	{ "6d41f0a39d6", "^[0123456789abcdef]*$", 1 },
+	/* DIGIT is 17 */
+	{ "##\x11%%\x11", "^[#%\\d]*$", 0 },
+	{ "##23%%45", "^[#%\\d]*$", 1 },
 	{}
 };
 
-- 
2.49.0



More information about the U-Boot mailing list