diff --git a/escapechars_test.go b/escapechars_test.go index 1e5d380..8594fc4 100644 --- a/escapechars_test.go +++ b/escapechars_test.go @@ -41,6 +41,28 @@ func TestXMLEscapeChars(t *testing.T) { fmt.Println("m:", string(x)) } +func TestXMLEscapeChars2(t *testing.T) { + fmt.Println("================== TestXMLEscapeChars2") + + XMLEscapeChars(true) + defer XMLEscapeChars(false) + + ss := []byte(`"'<>&`) + fmt.Println(string(ss)) + + mv, err := NewMapXml(ss) + if err != nil { + t.Fatal(err) + } + fmt.Printf("%v\n", mv) + + x, err := mv.XmlIndent("", " ") + if err != nil { + t.Fatal(err) + } + fmt.Println("mv:", string(x)) +} + func TestXMLSeqEscapeChars(t *testing.T) { fmt.Println("================== TestXMLSeqEscapeChars") data := []byte(`