Commit 1dae4737 authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

unicode/utf8: add test for FullRune

Check that it now properly handles \xC0 and \xC1.

Fixes #11733.

Change-Id: I66cfe0d43f9d123d4c4509a3fa18b9b6380dfc39
Reviewed-on: https://go-review.googlesource.com/17225Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent f0005230
......@@ -100,6 +100,15 @@ func TestFullRune(t *testing.T) {
t.Errorf("FullRune(%q) = true, want false", s1)
}
}
for _, s := range []string{"\xc0", "\xc1"} {
b := []byte(s)
if !FullRune(b) {
t.Errorf("FullRune(%q) = false, want true", s)
}
if !FullRuneInString(s) {
t.Errorf("FullRuneInString(%q) = false, want true", s)
}
}
}
func TestEncodeRune(t *testing.T) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment