diff options
Diffstat (limited to 'libgo/go/html/entity_test.go')
-rw-r--r-- | libgo/go/html/entity_test.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgo/go/html/entity_test.go b/libgo/go/html/entity_test.go index a1eb4d4f013..2cf49d61d2d 100644 --- a/libgo/go/html/entity_test.go +++ b/libgo/go/html/entity_test.go @@ -17,6 +17,9 @@ func TestEntityLength(t *testing.T) { if 1+len(k) < utf8.RuneLen(v) { t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v)) } + if len(k) > longestEntityWithoutSemicolon && k[len(k)-1] != ';' { + t.Errorf("entity name %s is %d characters, but longestEntityWithoutSemicolon=%d", k, len(k), longestEntityWithoutSemicolon) + } } for k, v := range entity2 { if 1+len(k) < utf8.RuneLen(v[0])+utf8.RuneLen(v[1]) { |