From f9496250ad7138ef6885522b116e16225cac8c8b Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Sat, 14 Nov 2009 11:46:09 -0800 Subject: xml: Fixed CDATA parsing. Fixes issue 128. R=r, rsc http://codereview.appspot.com/154126 Committer: Russ Cox --- src/pkg/xml/xml_test.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/pkg/xml/xml_test.go') diff --git a/src/pkg/xml/xml_test.go b/src/pkg/xml/xml_test.go index 058c1e765..11918428b 100644 --- a/src/pkg/xml/xml_test.go +++ b/src/pkg/xml/xml_test.go @@ -24,7 +24,7 @@ const testInput = ` - Some text here. + ` @@ -52,7 +52,9 @@ var rawTokens = []Token{ EndElement{Name{"", "outer"}}, CharData(strings.Bytes("\n ")), StartElement{Name{"tag", "name"}, nil}, - CharData(strings.Bytes("\n Some text here.\n ")), + CharData(strings.Bytes("\n ")), + CharData(strings.Bytes("Some text here.")), + CharData(strings.Bytes("\n ")), EndElement{Name{"tag", "name"}}, CharData(strings.Bytes("\n")), EndElement{Name{"", "body"}}, @@ -83,7 +85,9 @@ var cookedTokens = []Token{ EndElement{Name{"ns2", "outer"}}, CharData(strings.Bytes("\n ")), StartElement{Name{"ns3", "name"}, nil}, - CharData(strings.Bytes("\n Some text here.\n ")), + CharData(strings.Bytes("\n ")), + CharData(strings.Bytes("Some text here.")), + CharData(strings.Bytes("\n ")), EndElement{Name{"ns3", "name"}}, CharData(strings.Bytes("\n")), EndElement{Name{"ns2", "body"}}, -- cgit v1.2.3