diff options
author | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
commit | 544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch) | |
tree | 88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /docProps_test.go | |
parent | 0e02329bedf6648259fd219642bb907bdb07fd21 (diff) |
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg`
- Exported error message
Diffstat (limited to 'docProps_test.go')
-rw-r--r-- | docProps_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docProps_test.go b/docProps_test.go index 0cb6f71..40ae2dc 100644 --- a/docProps_test.go +++ b/docProps_test.go @@ -42,12 +42,12 @@ func TestSetDocProps(t *testing.T) { Version: "1.0.0", })) assert.NoError(t, f.SaveAs(filepath.Join("test", "TestSetDocProps.xlsx"))) - f.XLSX["docProps/core.xml"] = nil + f.Pkg.Store("docProps/core.xml", nil) assert.NoError(t, f.SetDocProps(&DocProperties{})) // Test unsupported charset f = NewFile() - f.XLSX["docProps/core.xml"] = MacintoshCyrillicCharset + f.Pkg.Store("docProps/core.xml", MacintoshCyrillicCharset) assert.EqualError(t, f.SetDocProps(&DocProperties{}), "xml decode error: XML syntax error on line 1: invalid UTF-8") } @@ -59,13 +59,13 @@ func TestGetDocProps(t *testing.T) { props, err := f.GetDocProps() assert.NoError(t, err) assert.Equal(t, props.Creator, "Microsoft Office User") - f.XLSX["docProps/core.xml"] = nil + f.Pkg.Store("docProps/core.xml", nil) _, err = f.GetDocProps() assert.NoError(t, err) // Test unsupported charset f = NewFile() - f.XLSX["docProps/core.xml"] = MacintoshCyrillicCharset + f.Pkg.Store("docProps/core.xml", MacintoshCyrillicCharset) _, err = f.GetDocProps() assert.EqualError(t, err, "xml decode error: XML syntax error on line 1: invalid UTF-8") } |