Add invalid utf8 test cases to regexp

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This commit is contained in:
Oleg Zaytsev 2024-05-13 17:05:31 +02:00
parent bcff5059e6
commit dbe88fae22
No known key found for this signature in database
GPG key ID: 7E9FE9FD48F512EF

View file

@ -37,6 +37,7 @@ var (
".*foo",
"^.*foo$",
"^.+foo$",
".?",
".*",
".+",
"foo.+",
@ -89,6 +90,12 @@ var (
// Values matching / not matching the test regexps on long alternations.
"zQPbMkNO", "zQPbMkNo", "jyyfj00j0061", "jyyfj00j006", "jyyfj00j00612", "NNSPdvMi", "NNSPdvMiXXX", "NNSPdvMixxx", "nnSPdvMi", "nnSPdvMiXXX",
// Invalid utf8
"\xfefoo",
"foo\xfe",
"\xfd",
"\xff\xff",
}
)