diff options
Diffstat (limited to 'lib_test.go')
-rw-r--r-- | lib_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib_test.go b/lib_test.go index e4ccdcc..f3e9b3e 100644 --- a/lib_test.go +++ b/lib_test.go @@ -1,6 +1,7 @@ package excelize import ( + "encoding/xml" "fmt" "strconv" "strings" @@ -215,6 +216,13 @@ func TestBytesReplace(t *testing.T) { assert.EqualValues(t, s, bytesReplace(s, []byte{}, []byte{}, 0)) } +func TestSetIgnorableNameSpace(t *testing.T) { + f := NewFile() + f.xmlAttr["xml_path"] = []xml.Attr{{}} + f.setIgnorableNameSpace("xml_path", 0, xml.Attr{Name: xml.Name{Local: "c14"}}) + assert.EqualValues(t, "c14", f.xmlAttr["xml_path"][0].Value) +} + func TestStack(t *testing.T) { s := NewStack() assert.Equal(t, s.Peek(), nil) |