(t *testing.T)
| 413 | } |
| 414 | |
| 415 | func TestEscapeOutputValue(t *testing.T) { |
| 416 | data := `<AAA><*></AAA>` |
| 417 | |
| 418 | root, err := Parse(strings.NewReader(data)) |
| 419 | if err != nil { |
| 420 | t.Error(err) |
| 421 | } |
| 422 | |
| 423 | escapedInnerText := root.OutputXML(true) |
| 424 | if !strings.Contains(escapedInnerText, "<*>") { |
| 425 | t.Fatal("Inner Text has not been escaped") |
| 426 | } |
| 427 | |
| 428 | } |
| 429 | |
| 430 | func TestEscapeValueWrite(t *testing.T) { |
| 431 | data := `<AAA><*></AAA>` |