...
1
2
3
4
5 package unicode
6
7 import (
8 "testing"
9 "unicode"
10
11 "golang.org/x/text/internal/gen"
12 "golang.org/x/text/internal/testtext"
13 "golang.org/x/text/internal/ucd"
14 )
15
16
17
18 func TestScripts(t *testing.T) {
19 testtext.SkipIfNotLong(t)
20
21 ucd.Parse(gen.OpenUCDFile("Scripts.txt"), func(p *ucd.Parser) {
22 r := p.Rune(0)
23 script := p.String(1)
24 if !unicode.Is(unicode.Scripts[script], r) {
25 t.Errorf("%U: not in script %q", r, script)
26 }
27 })
28 }
29
View as plain text