summaryrefslogtreecommitdiff
path: root/lib_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib_test.go')
-rw-r--r--lib_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib_test.go b/lib_test.go
index f3e9b3e..10d7c3a 100644
--- a/lib_test.go
+++ b/lib_test.go
@@ -228,3 +228,9 @@ func TestStack(t *testing.T) {
assert.Equal(t, s.Peek(), nil)
assert.Equal(t, s.Pop(), nil)
}
+
+func TestGenXMLNamespace(t *testing.T) {
+ assert.Equal(t, genXMLNamespace([]xml.Attr{
+ {Name: xml.Name{Space: NameSpaceXML, Local: "space"}, Value: "preserve"},
+ }), `xml:space="preserve">`)
+}