OSDN Git Service

Update Go library to r60.
[pf3gnuchains/gcc-fork.git] / libgo / go / html / entity_test.go
index a1eb4d4..2cf49d6 100644 (file)
@@ -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]) {