mirror of
https://github.com/yuin/goldmark
synced 2025-03-04 23:04:52 +00:00
16 lines
294 B
Go
16 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")
|
|
}
|
|
}
|