diff options
Diffstat (limited to 'test/stringrange.go')
-rw-r--r-- | test/stringrange.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/stringrange.go b/test/stringrange.go index daaba91c6..99e5edb5a 100644 --- a/test/stringrange.go +++ b/test/stringrange.go @@ -57,6 +57,13 @@ func main() { ok = false } + for _, c := range "a\xed\xa0\x80a" { + if c != 'a' && c != utf8.RuneError { + fmt.Printf("surrogate UTF-8 does not error: %U\n", c) + ok = false + } + } + if !ok { fmt.Println("BUG: stringrange") os.Exit(1) |