Commit a025e1ca authored by Shawn Smith's avatar Shawn Smith Committed by Brad Fitzpatrick

html: add tests for UnescapeString edge cases

R=golang-dev, gobot, bradfitz
CC=golang-dev
https://golang.org/cl/40810044
parent c22e79b3
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment