From 083de50a9b8b33d0f27e54a4f6274b7dcf54359b Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 5 Aug 2015 16:14:55 -0400 Subject: [PATCH] cases: skip tests if unicode.Version does not match UnicodeVersion For golang/go#11811. Fixes golang/go#11927. Change-Id: Ie60c687ba93aaeb6c164413289f474be63e0224f Reviewed-on: https://go-review.googlesource.com/13252 Reviewed-by: Robert Griesemer --- cases/context_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cases/context_test.go b/cases/context_test.go index d6c012f02..2b9497261 100644 --- a/cases/context_test.go +++ b/cases/context_test.go @@ -63,6 +63,9 @@ func contextFromRune(r rune) *context { } func TestCaseProperties(t *testing.T) { + if unicode.Version != UnicodeVersion { + t.Skipf("UnicodeVersion=%s, but unicode.Version=%s", UnicodeVersion, unicode.Version) + } assigned := rangetable.Assigned(UnicodeVersion) for r := rune(0); r <= lastRuneForTesting; r++ { if !unicode.In(r, assigned) || !unicode.In(unicode.SimpleFold(r), assigned) { @@ -89,6 +92,9 @@ func TestCaseProperties(t *testing.T) { } func TestMapping(t *testing.T) { + if unicode.Version != UnicodeVersion { + t.Skipf("UnicodeVersion=%s, but unicode.Version=%s", UnicodeVersion, unicode.Version) + } assigned := rangetable.Assigned(UnicodeVersion) apply := func(r rune, f func(c *context) bool) string { c := contextFromRune(r)