From e2562de874fc45113a4469eedd8fed496cc372e9 Mon Sep 17 00:00:00 2001 From: Charles Banning Date: Sun, 30 Dec 2018 10:03:52 -0700 Subject: [PATCH] add test for latest pull request --- escapechars_test.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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(`