Files
jiang13-forum/services/mention_test.go
freefire 3f50316ad0 fix: 完成 Gitea 目录改组收尾(import、构建与 LICENSE)
同步包路径与路由,去掉 SPA 构建步骤,对齐 Gitea 式 LICENSE,并更新规格/规则与占位 SSR。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 04:01:20 +08:00

15 lines
301 B
Go

package services
import (
"reflect"
"testing"
)
func TestExtractMentionNames(t *testing.T) {
got := ExtractMentionNames("hi @alice 和 @小明_x 以及 @bob-1")
want := []string{"alice", "小明_x", "bob-1"}
if !reflect.DeepEqual(got, want) {
t.Fatalf("got %#v, want %#v", got, want)
}
}