summaryrefslogtreecommitdiff
path: root/col_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-10-25 10:24:45 +0800
committerGitHub <noreply@github.com>2022-10-25 10:24:45 +0800
commitf44153ea4679247070d6f1e31bb0934a10bebb31 (patch)
treeb47fc64c3446ebb5c98fa70e52c1ecb56c45e573 /col_test.go
parent14c6a198ce27b44fcce5447a2b757ce403ebb8fc (diff)
This closes #1377, stream writer writes inline string type for string cell value
- Add `CellTypeFormula`, `CellTypeInlineString`, `CellTypeSharedString` and remove `CellTypeString` in `CellType` enumeration - Unit tests updated
Diffstat (limited to 'col_test.go')
-rw-r--r--col_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/col_test.go b/col_test.go
index 75c191b..f786335 100644
--- a/col_test.go
+++ b/col_test.go
@@ -109,12 +109,12 @@ func TestGetColsError(t *testing.T) {
f = NewFile()
f.Sheet.Delete("xl/worksheets/sheet1.xml")
- f.Pkg.Store("xl/worksheets/sheet1.xml", []byte(`<worksheet><sheetData><row r="A"><c r="2" t="str"><v>B</v></c></row></sheetData></worksheet>`))
+ f.Pkg.Store("xl/worksheets/sheet1.xml", []byte(`<worksheet><sheetData><row r="A"><c r="2" t="inlineStr"><is><t>B</t></is></c></row></sheetData></worksheet>`))
f.checked = nil
_, err = f.GetCols("Sheet1")
assert.EqualError(t, err, `strconv.Atoi: parsing "A": invalid syntax`)
- f.Pkg.Store("xl/worksheets/sheet1.xml", []byte(`<worksheet><sheetData><row r="2"><c r="A" t="str"><v>B</v></c></row></sheetData></worksheet>`))
+ f.Pkg.Store("xl/worksheets/sheet1.xml", []byte(`<worksheet><sheetData><row r="2"><c r="A" t="inlineStr"><is><t>B</t></is></c></row></sheetData></worksheet>`))
_, err = f.GetCols("Sheet1")
assert.EqualError(t, err, newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())
@@ -124,7 +124,7 @@ func TestGetColsError(t *testing.T) {
cols.totalRows = 2
cols.totalCols = 2
cols.curCol = 1
- cols.sheetXML = []byte(`<worksheet><sheetData><row r="1"><c r="A" t="str"><v>A</v></c></row></sheetData></worksheet>`)
+ cols.sheetXML = []byte(`<worksheet><sheetData><row r="1"><c r="A" t="inlineStr"><is><t>A</t></is></c></row></sheetData></worksheet>`)
_, err = cols.Rows()
assert.EqualError(t, err, newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error())