package mxj import "testing" var whiteSpaceDataSeqTest = []byte(` William T. Gaddis The Recognitions One of the great seminal American novels of the 20th century. Austin Tappan Wright Islandia An example of earlier 20th century American utopian fiction. John Hawkes The Beetle Leg A lyrical novel about the construction of Ft. Peck Dam in Montana. `) func TestNewMapXmlSeqWhiteSpace(t *testing.T) { t.Run("Testing NewMapFormattedXmlSeq with WhiteSpacing", func(t *testing.T) { DisableTrimWhiteSpace(true) m, err := NewMapFormattedXmlSeq(whiteSpaceDataSeqTest) if err != nil { t.Fatal(err) } m1 := MapSeq(m) x, err := m1.XmlIndent("", " ") if err != nil { t.Fatal(err) } if string(x) != string(whiteSpaceDataSeqTest) { t.Fatalf("expected\n'%s' \ngot \n'%s'", whiteSpaceDataSeqTest, x) } }) DisableTrimWhiteSpace(false) }