From 544ef18a8cb9949fcb8833c6d2816783c90f3318 Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 5 Jul 2021 00:03:56 +0800 Subject: - Support concurrency iterate rows and columns - Rename exported field `File.XLSX` to `File.Pkg` - Exported error message --- docProps_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docProps_test.go') 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") } -- cgit v1.2.1