mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-17 23:00:29 +00:00
Backport #30795 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
97a7c04a8f
commit
ac91bb27ff
4 files changed
+14
-10
No files matched your search
@@ -392,6 +392,7 @@ func TestRegExp_mentionPattern(t *testing.T) {
|
||||
{"@gitea,", "@gitea"},
|
||||
{"@gitea;", "@gitea"},
|
||||
{"@gitea/team1;", "@gitea/team1"},
|
||||
{"@user's idea", "@user"},
|
||||
}
|
||||
falseTestCases := []string{
|
||||
"@ 0",
|
||||
@@ -412,7 +413,6 @@ func TestRegExp_mentionPattern(t *testing.T) {
|
||||
|
||||
for _, testCase := range trueTestCases {
|
||||
found := mentionPattern.FindStringSubmatch(testCase.pat)
|
||||
assert.Len(t, found, 2)
|
||||
assert.Equal(t, testCase.exp, found[1])
|
||||
}
|
||||
for _, testCase := range falseTestCases {
|
||||
|
||||
Reference in new issue
Block a user