summaryrefslogtreecommitdiff
path: root/rows_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-02-05 22:52:31 +0800
committerxuri <xuri.me@gmail.com>2021-02-05 22:52:31 +0800
commit2fb135bc94bbb0c487563d166fd24786fab7280a (patch)
treeeaa8a669727c8b83c3910c0511aa4dbf4cdf9bf5 /rows_test.go
parent66d85dae1367c106acd373baa5087e4bd712e3f9 (diff)
handle end element event in the worksheet row/column iterator XML SAX parser
Diffstat (limited to 'rows_test.go')
-rw-r--r--rows_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/rows_test.go b/rows_test.go
index 73931aa..0e250f6 100644
--- a/rows_test.go
+++ b/rows_test.go
@@ -46,6 +46,10 @@ func TestRows(t *testing.T) {
f.XLSX["xl/worksheets/sheet1.xml"] = []byte(`<worksheet><sheetData><row r="1"><c r="A1" t="s"><v>1</v></c></row><row r="A"><c r="2" t="str"><v>B</v></c></row></sheetData></worksheet>`)
_, err = f.Rows("Sheet1")
assert.EqualError(t, err, `strconv.Atoi: parsing "A": invalid syntax`)
+
+ f.XLSX["xl/worksheets/sheet1.xml"] = nil
+ _, err = f.Rows("Sheet1")
+ assert.NoError(t, err)
}
func TestRowsIterator(t *testing.T) {