Browse Source

Add invalid utf8 test cases to regexp

Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
pull/14090/head
Oleg Zaytsev 6 months ago
parent
commit
dbe88fae22
No known key found for this signature in database
GPG Key ID: 7E9FE9FD48F512EF
  1. 7
      model/labels/regexp_test.go

7
model/labels/regexp_test.go

@ -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",
}
)

Loading…
Cancel
Save