mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
Allow square brackets in external issue patterns (#3408)
* Allow square brackets in external issue patterns * Added false test cases for checklist elements
This commit is contained in:
committed by
Lauris BH
parent
e08b3a592e
commit
e9e2a9cdcc
@ -345,6 +345,7 @@ func TestRegExp_IssueNumericPattern(t *testing.T) {
|
||||
"#1234",
|
||||
"#0",
|
||||
"#1234567890987654321",
|
||||
"[#1234]",
|
||||
}
|
||||
falseTestCases := []string{
|
||||
"# 1234",
|
||||
@ -355,6 +356,8 @@ func TestRegExp_IssueNumericPattern(t *testing.T) {
|
||||
"#1A2B",
|
||||
"",
|
||||
"ABC",
|
||||
"[]",
|
||||
"[x]",
|
||||
}
|
||||
|
||||
for _, testCase := range trueTestCases {
|
||||
@ -371,6 +374,7 @@ func TestRegExp_IssueAlphanumericPattern(t *testing.T) {
|
||||
"A-1",
|
||||
"RC-80",
|
||||
"ABCDEFGHIJ-1234567890987654321234567890",
|
||||
"[JIRA-134]",
|
||||
}
|
||||
falseTestCases := []string{
|
||||
"RC-08",
|
||||
@ -383,6 +387,7 @@ func TestRegExp_IssueAlphanumericPattern(t *testing.T) {
|
||||
"ABC",
|
||||
"GG-",
|
||||
"rm-1",
|
||||
"[]",
|
||||
}
|
||||
|
||||
for _, testCase := range trueTestCases {
|
||||
|
Reference in New Issue
Block a user