summaryrefslogtreecommitdiff
path: root/docProps_test.go
diff options
context:
space:
mode:
authorAlex Geer <monoflash@gmail.com>2019-12-19 19:30:48 +0300
committerxuri <xuri.me@gmail.com>2019-12-20 00:30:48 +0800
commitb1b3c0d15158abc71267da5893de020f047c3872 (patch)
tree53f9e5a1f42130825572a3c3eea39b2eb4d00f62 /docProps_test.go
parenta00ba75f0f294ce04bfe8d25703d13cd27d6284f (diff)
Fix #539 Fixed error opening excel file created in encoding d… (#540)
* Fixed issue #539 Fixed error opening excel file created in encoding different from UTF-8, added logging of possible errors when decoding XML if the function does not provide exit with an error * Added test for CharsetReader * Fixed #discussion_r359397878 Discussion: https://github.com/360EntSecGroup-Skylar/excelize/pull/540#discussion_r359397878 * Fixed go fmt * go mod tidy and removed unused imports * The code has been refactored
Diffstat (limited to 'docProps_test.go')
-rw-r--r--docProps_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/docProps_test.go b/docProps_test.go
index 671d998..df3122b 100644
--- a/docProps_test.go
+++ b/docProps_test.go
@@ -39,7 +39,7 @@ func TestSetDocProps(t *testing.T) {
}))
assert.NoError(t, f.SaveAs(filepath.Join("test", "TestSetDocProps.xlsx")))
f.XLSX["docProps/core.xml"] = nil
- assert.EqualError(t, f.SetDocProps(&DocProperties{}), "EOF")
+ assert.NoError(t, f.SetDocProps(&DocProperties{}))
}
func TestGetDocProps(t *testing.T) {
@@ -52,5 +52,5 @@ func TestGetDocProps(t *testing.T) {
assert.Equal(t, props.Creator, "Microsoft Office User")
f.XLSX["docProps/core.xml"] = nil
_, err = f.GetDocProps()
- assert.EqualError(t, err, "EOF")
+ assert.NoError(t, err)
}