diff options
author | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 |
commit | ac564afa56a691e378ab9bb04cb14bb283886a16 (patch) | |
tree | def0303fd88e78897a3c739c31c89cff8f492d43 /shape_test.go | |
parent | bd5dd17673f767b9f4643423c77eec486f2ad53f (diff) |
Remove internal error log print, throw XML deserialize error
Diffstat (limited to 'shape_test.go')
-rw-r--r-- | shape_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/shape_test.go b/shape_test.go index 9d1da8a..2b2e87c 100644 --- a/shape_test.go +++ b/shape_test.go @@ -87,10 +87,15 @@ func TestAddShape(t *testing.T) { } }`)) assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddShape2.xlsx"))) - // Test set row style with unsupported charset style sheet. + // Test add shape with unsupported charset style sheet. f.Styles = nil f.Pkg.Store(defaultXMLPathStyles, MacintoshCyrillicCharset) assert.EqualError(t, f.AddShape("Sheet1", "B30", `{"type":"rect","paragraph":[{"text":"Rectangle"},{}]}`), "XML syntax error on line 1: invalid UTF-8") + // Test add shape with unsupported charset content types. + f = NewFile() + f.ContentTypes = nil + f.Pkg.Store(defaultXMLPathContentTypes, MacintoshCyrillicCharset) + assert.EqualError(t, f.AddShape("Sheet1", "B30", `{"type":"rect","paragraph":[{"text":"Rectangle"},{}]}`), "XML syntax error on line 1: invalid UTF-8") } func TestAddDrawingShape(t *testing.T) { |