aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/html/parse_test.go
diff options
context:
space:
mode:
authorNigel Tao <nigeltao@golang.org>2011-10-19 08:03:30 +1100
committerNigel Tao <nigeltao@golang.org>2011-10-19 08:03:30 +1100
commitb1fd528db5305d85c6dfabd8ff7d0656c7f97a39 (patch)
treed6cc2c1f9bcf11694a1d7fa3336e2cdd539eea09 /src/pkg/html/parse_test.go
parent78ad19f214394a1cb1e96d448bacb84011204452 (diff)
downloadgo-b1fd528db5305d85c6dfabd8ff7d0656c7f97a39.tar.xz
html: parse raw text and RCDATA elements, such as <script> and <title>.
Pass tests1.dat, test 26: #data <script><div></script></div><title><p></title><p><p> #document | <html> | <head> | <script> | "<div>" | <title> | "<p>" | <body> | <p> | <p> Thanks to Andy Balholm for driving this change. R=andybalholm CC=golang-dev https://golang.org/cl/5301042
Diffstat (limited to 'src/pkg/html/parse_test.go')
-rw-r--r--src/pkg/html/parse_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/html/parse_test.go b/src/pkg/html/parse_test.go
index c6fd37a10e..564580c78b 100644
--- a/src/pkg/html/parse_test.go
+++ b/src/pkg/html/parse_test.go
@@ -80,13 +80,13 @@ func dumpLevel(w io.Writer, n *Node, level int) os.Error {
case DocumentNode:
return os.NewError("unexpected DocumentNode")
case ElementNode:
- fmt.Fprintf(w, "<%s>", EscapeString(n.Data))
+ fmt.Fprintf(w, "<%s>", n.Data)
case TextNode:
- fmt.Fprintf(w, "%q", EscapeString(n.Data))
+ fmt.Fprintf(w, "%q", n.Data)
case CommentNode:
return os.NewError("COMMENT")
case DoctypeNode:
- fmt.Fprintf(w, "<!DOCTYPE %s>", EscapeString(n.Data))
+ fmt.Fprintf(w, "<!DOCTYPE %s>", n.Data)
case scopeMarkerNode:
return os.NewError("unexpected scopeMarkerNode")
default:
@@ -123,7 +123,7 @@ func TestParser(t *testing.T) {
rc := make(chan io.Reader)
go readDat(filename, rc)
// TODO(nigeltao): Process all test cases, not just a subset.
- for i := 0; i < 26; i++ {
+ for i := 0; i < 27; i++ {
// Parse the #data section.
b, err := ioutil.ReadAll(<-rc)
if err != nil {