1
0
mirror of https://github.com/golang/go synced 2024-11-12 08:20:22 -07:00

html: add tests for UnescapeString edge cases

R=golang-dev, gobot, bradfitz
CC=golang-dev
https://golang.org/cl/40810044
This commit is contained in:
Shawn Smith 2013-12-18 10:20:25 -08:00 committed by Brad Fitzpatrick
parent c22e79b37b
commit a025e1caac

View File

@ -64,6 +64,24 @@ var unescapeTests = []unescapeTest{
"Footnote‡",
"Footnote‡",
},
// Handle single ampersand.
{
"copySingleAmpersand",
"&",
"&",
},
// Handle ampersand followed by non-entity.
{
"copyAmpersandNonEntity",
"text &test",
"text &test",
},
// Handle "&#".
{
"copyAmpersandHash",
"text &#",
"text &#",
},
}
func TestUnescape(t *testing.T) {