summaryrefslogtreecommitdiff
path: root/rows_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-08-12 00:32:51 +0800
committerxuri <xuri.me@gmail.com>2022-08-12 00:32:51 +0800
commit8152bbb2cec76f074dc18c43f3c66bf8abdf9de0 (patch)
tree5052a82092f141cda644c83d5e891d2edf769aa8 /rows_test.go
parented91cddea59ce15da87ab744ac20b465a36ed5ef (diff)
This closes #1312, #1313, fix number format issue
- Add supported options in the docs of the functions `SetSheetPrOptions` and `GetSheetPrOptions` - Add go1.19 unit test settings, and made the test case compatible with go1.19 - Update dependencies module
Diffstat (limited to 'rows_test.go')
-rw-r--r--rows_test.go24
1 files changed, 13 insertions, 11 deletions
diff --git a/rows_test.go b/rows_test.go
index 4b57c34..585401b 100644
--- a/rows_test.go
+++ b/rows_test.go
@@ -107,17 +107,19 @@ func TestRowsGetRowOpts(t *testing.T) {
rows, err := f.Rows(sheetName)
require.NoError(t, err)
- rows.Next()
- rows.Columns() // Columns() may change the XML iterator, so better check with and without calling it
- got := rows.GetRowOpts()
- assert.Equal(t, expectedRowStyleID1, got)
- rows.Next()
- got = rows.GetRowOpts()
- assert.Equal(t, expectedRowStyleID2, got)
- rows.Next()
- rows.Columns()
- got = rows.GetRowOpts()
- assert.Equal(t, expectedRowStyleID3, got)
+ assert.Equal(t, true, rows.Next())
+ _, err = rows.Columns()
+ require.NoError(t, err)
+ rowOpts := rows.GetRowOpts()
+ assert.Equal(t, expectedRowStyleID1, rowOpts)
+ assert.Equal(t, true, rows.Next())
+ rowOpts = rows.GetRowOpts()
+ assert.Equal(t, expectedRowStyleID2, rowOpts)
+ assert.Equal(t, true, rows.Next())
+ _, err = rows.Columns()
+ require.NoError(t, err)
+ rowOpts = rows.GetRowOpts()
+ assert.Equal(t, expectedRowStyleID3, rowOpts)
}
func TestRowsError(t *testing.T) {