mirror of
https://github.com/golang/go
synced 2024-11-13 18:40: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:
parent
c22e79b37b
commit
a025e1caac
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user