blob: ce7ae2e75aaa2ed831208e981e18a1386c1716a8 [file] [log] [blame]
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package unicode
import (
// TestScripts tests for all runes whether they are included in the correct
// script and, indirectly, whether each script exists.
func TestScripts(t *testing.T) {
ucd.Parse(gen.OpenUCDFile("Scripts.txt"), func(p *ucd.Parser) {
r := p.Rune(0)
script := p.String(1)
if !unicode.Is(unicode.Scripts[script], r) {
t.Errorf("%U: not in script %q", r, script)