Debian Codegraph @

text/reader_test.go

raw symbols SCIP
1 package text
2
3 import (
4 "regexp"
5 "testing"
6 )
7
8 func TestFindSubMatchReader(t *testing.T) {
9 s := "微笑"
10 r := NewReader([]byte(":" + s + ":"))
11 reg := regexp.MustCompile(`:(\p{L}+):`)
12 match := r.FindSubMatch(reg)
13 if len(match) != 2 || string(match[1]) != s {
14 t.Fatal("no match cjk")
15 }
16 }