(t *testing.T)
| 218 | } |
| 219 | |
| 220 | func TestMultipleProcInst(t *testing.T) { |
| 221 | s := `<?xml version="1.0" encoding="UTF-8"?> |
| 222 | <?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?> |
| 223 | <?xml-stylesheet type="text/css" media="screen" href="http://feeds.reuters.com/~d/styles/itemcontent.css"?> |
| 224 | <rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"> |
| 225 | </rss> |
| 226 | ` |
| 227 | doc, err := Parse(strings.NewReader(s)) |
| 228 | if err != nil { |
| 229 | t.Fatal(err) |
| 230 | } |
| 231 | |
| 232 | node := doc.FirstChild // <?xml ?> |
| 233 | if node.Data != "xml" { |
| 234 | t.Fatal("node.Data != xml") |
| 235 | } |
| 236 | node = node.NextSibling // New Line |
| 237 | node = node.NextSibling // <?xml-stylesheet?> |
| 238 | if node.Data != "xml-stylesheet" { |
| 239 | t.Fatal("node.Data != xml-stylesheet") |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | func TestParse(t *testing.T) { |
| 244 | s := `<?xml version="1.0" encoding="UTF-8"?> |
nothing calls this directly
no test coverage detected
searching dependent graphs…