1
0
forked from MTSR/mapserver
mapserver/mapobjectdb/utf8_test.go

19 lines
293 B
Go
Raw Normal View History

package mapobjectdb
import (
"testing"
"unicode/utf8"
)
func TestInvalidUtf8(t *testing.T) {
if utf8.Valid([]byte{0xe1, 0x7f, 0xc7}) {
t.Error("should be invalid")
}
}
func TestValidUtf8(t *testing.T) {
if !utf8.Valid([]byte("some valid string")) {
t.Error("should be valid")
}
}