mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-20 00:41:29 +01:00
test: slre: add tests for character ranges
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 <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
This commit is contained in:
parent
fe4f211850
commit
de6e54d74d
@ -29,6 +29,14 @@ static const struct re_test re_test[] = {
|
||||
/* DIGIT is 17 */
|
||||
{ "##\x11%%\x11", "^[#%\\d]*$", 0 },
|
||||
{ "##23%%45", "^[#%\\d]*$", 1 },
|
||||
{ "U-Boot", "^[B-Uo-t]*$", 0 },
|
||||
{ "U-Boot", "^[A-Zm-v-]*$", 1 },
|
||||
{ "U-Boot", "^[-A-Za-z]*$", 1 },
|
||||
/* The range --C covers both - and B. */
|
||||
{ "U-Boot", "^[--CUot]*$", 1 },
|
||||
{ "U-Boot", "^[^0-9]*$", 1 },
|
||||
{ "U-Boot", "^[^0-9<->]*$", 1 },
|
||||
{ "U-Boot", "^[^0-9<\\->]*$", 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user