diff options
author | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-05 00:03:56 +0800 |
commit | 544ef18a8cb9949fcb8833c6d2816783c90f3318 (patch) | |
tree | 88bb3eaa9d92522d3b5c4eeb052210c26bc4c99f /adjust_test.go | |
parent | 0e02329bedf6648259fd219642bb907bdb07fd21 (diff) |
- Support concurrency iterate rows and columns
- Rename exported field `File.XLSX` to `File.Pkg`
- Exported error message
Diffstat (limited to 'adjust_test.go')
-rw-r--r-- | adjust_test.go | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/adjust_test.go b/adjust_test.go index 0d63ed6..c4af38b 100644 --- a/adjust_test.go +++ b/adjust_test.go @@ -73,20 +73,10 @@ func TestAdjustAutoFilter(t *testing.T) { func TestAdjustHelper(t *testing.T) { f := NewFile() f.NewSheet("Sheet2") - f.Sheet["xl/worksheets/sheet1.xml"] = &xlsxWorksheet{ - MergeCells: &xlsxMergeCells{ - Cells: []*xlsxMergeCell{ - { - Ref: "A:B1", - }, - }, - }, - } - f.Sheet["xl/worksheets/sheet2.xml"] = &xlsxWorksheet{ - AutoFilter: &xlsxAutoFilter{ - Ref: "A1:B", - }, - } + f.Sheet.Store("xl/worksheets/sheet1.xml", &xlsxWorksheet{ + MergeCells: &xlsxMergeCells{Cells: []*xlsxMergeCell{{Ref: "A:B1"}}}}) + f.Sheet.Store("xl/worksheets/sheet2.xml", &xlsxWorksheet{ + AutoFilter: &xlsxAutoFilter{Ref: "A1:B"}}) // testing adjustHelper with illegal cell coordinates. assert.EqualError(t, f.adjustHelper("Sheet1", rows, 0, 0), `cannot convert cell "A" to coordinates: invalid cell name "A"`) assert.EqualError(t, f.adjustHelper("Sheet2", rows, 0, 0), `cannot convert cell "B" to coordinates: invalid cell name "B"`) |