diff options
Diffstat (limited to 'drawing_test.go')
-rw-r--r-- | drawing_test.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drawing_test.go b/drawing_test.go index d33977f..e37b771 100644 --- a/drawing_test.go +++ b/drawing_test.go @@ -12,6 +12,7 @@ package excelize import ( + "encoding/xml" "sync" "testing" ) @@ -22,9 +23,13 @@ func TestDrawingParser(t *testing.T) { Pkg: sync.Map{}, } f.Pkg.Store("charset", MacintoshCyrillicCharset) - f.Pkg.Store("wsDr", []byte(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"><xdr:oneCellAnchor><xdr:graphicFrame/></xdr:oneCellAnchor></xdr:wsDr>`)) + f.Pkg.Store("wsDr", []byte(xml.Header+`<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"><xdr:oneCellAnchor><xdr:graphicFrame/></xdr:oneCellAnchor></xdr:wsDr>`)) // Test with one cell anchor f.drawingParser("wsDr") // Test with unsupported charset f.drawingParser("charset") + // Test with alternate content + f.Drawings = sync.Map{} + f.Pkg.Store("wsDr", []byte(xml.Header+`<xdr:wsDr xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing"><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" Requires="a14"><xdr:twoCellAnchor editAs="oneCell"></xdr:twoCellAnchor></mc:Choice><mc:Fallback/></mc:AlternateContent></xdr:wsDr>`)) + f.drawingParser("wsDr") } |