summaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/html/entity_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-07-02 12:12:53 +0200
committerDimitri Sokolyuk <demon@dim13.org>2019-07-02 12:12:53 +0200
commit473acc61c8392dc7ae303d91568e179c4f105a76 (patch)
treea2070cba25f918cda460387e587dd60551b23894 /vendor/golang.org/x/net/html/entity_test.go
parentdd45f63209a8e51979b11182253ee80b5289c10a (diff)
add black list
Diffstat (limited to 'vendor/golang.org/x/net/html/entity_test.go')
-rw-r--r--vendor/golang.org/x/net/html/entity_test.go29
1 files changed, 0 insertions, 29 deletions
diff --git a/vendor/golang.org/x/net/html/entity_test.go b/vendor/golang.org/x/net/html/entity_test.go
deleted file mode 100644
index b53f866..0000000
--- a/vendor/golang.org/x/net/html/entity_test.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package html
-
-import (
- "testing"
- "unicode/utf8"
-)
-
-func TestEntityLength(t *testing.T) {
- // We verify that the length of UTF-8 encoding of each value is <= 1 + len(key).
- // The +1 comes from the leading "&". This property implies that the length of
- // unescaped text is <= the length of escaped text.
- for k, v := range entity {
- 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]) {
- t.Error("escaped entity &" + k + " is shorter than its UTF-8 encoding " + string(v[0]) + string(v[1]))
- }
- }
-}