]> Cypherpunks.ru repositories - gostls13.git/blobdiff - test/stringrange.go
cmd/compile/internal/inline: score call sites exposed by inlines
[gostls13.git] / test / stringrange.go
index daaba91c697dd02b941002f50cb8eeaf8c0fc2df..99e5edb5a429d1ce4dc0ca30e4bc77385018c8ef 100644 (file)
@@ -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)