Skip to content

TestWorksheetWriter fails with Go tip (on branch v2) #1465

@ianlancetaylor

Description

@ianlancetaylor

Description

The test TestWorksheetWriter fails when using Go tip, due to https://go.dev/cl/108796.

Steps to reproduce the issue:

  1. Download and build Go tip as described at https://go.dev/doc/install/source.
  2. Run go test -test.run=TestWorksheetWriter on branch v2.

Describe the results you received:

--- FAIL: TestWorksheetWriter (0.00s)
    sheet_test.go:436: 
        	Error Trace:	/home/iant/gopath/src/github.com/qax-os/excelize/sheet_test.go:436
        	Error:      	Not equal: 
        	            	expected: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<worksheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"><sheetData><row r=\"1\"><c r=\"A1\"><v>2</v></c></row></sheetData><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></worksheet>"
        	            	actual  : "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<worksheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\"><sheetData xmlns=\"\"><row r=\"1\"><c r=\"A1\"><v>2</v></c></row></sheetData><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></worksheet>"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,2 @@
        	            	 <?xml version="1.0" encoding="UTF-8"?>
        	            	-<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheetData><row r="1"><c r="A1"><v>2</v></c></row></sheetData><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></worksheet>
        	            	+<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheetData xmlns=""><row r="1"><c r="A1"><v>2</v></c></row></sheetData><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></worksheet>
        	Test:       	TestWorksheetWriter
FAIL
exit status 1
FAIL	github.com/xuri/excelize/v2	0.012s

Describe the results you expected:

Successful test

Output of go version:

go version devel go1.21-93f5335be9 Thu Feb 2 23:40:14 2023 +0000 linux/amd64

Excelize version or commit ID:

version v2, tag v2.7.0, 5429f131f87a6c35564a44e491e1047af79510fb

Environment details (OS, Microsoft Excel™ version, physical, etc.):

Ubuntu Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThis issue can be reproducedgoPull requests that update Go code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions