Files
website/text/reader_test.go
T
terbshaeusser ad273dbe5d Squashed 'backend/goldmark/' content from commit 379bf24
git-subtree-dir: backend/goldmark
git-subtree-split: 379bf24a47e6ef07f34d7536aead86d8792ac300
2026-05-24 09:40:13 +02:00

17 lines
294 B
Go

package text
import (
"regexp"
"testing"
)
func TestFindSubMatchReader(t *testing.T) {
s := "微笑"
r := NewReader([]byte(":" + s + ":"))
reg := regexp.MustCompile(`:(\p{L}+):`)
match := r.FindSubMatch(reg)
if len(match) != 2 || string(match[1]) != s {
t.Fatal("no match cjk")
}
}