1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 "golang.org/x/text/internal/gen"
13 "golang.org/x/text/internal/testtext"
14 "golang.org/x/text/internal/ucd"
17 func TestName(t *testing.T) {
18 testtext.SkipIfNotLong(t)
20 wants := make([]string, 1+unicode.MaxRune)
21 ucd.Parse(gen.OpenUCDFile("UnicodeData.txt"), func(p *ucd.Parser) {
22 r, s := p.Rune(0), p.String(ucd.Name)
27 const first = ", First>"
28 if i := strings.Index(s, first); i >= 0 {
36 for r, want := range wants {
39 t.Errorf("r=%#08x: got %q, want %q", r, got, want)
42 t.Fatal("too many errors")