From f2df344739146189a1dea7cfb81239231af5135b Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 15 Apr 2019 11:22:57 +0800 Subject: Resolve #369,#370 add error return value exported functions: GetMergeCells ProtectSheet UnprotectSheet UpdateLinkedValue GetMergeCells SetSheetVisible inner functions: workSheetReader copySheet --- adjust_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'adjust_test.go') diff --git a/adjust_test.go b/adjust_test.go index 104eff9..a35e609 100644 --- a/adjust_test.go +++ b/adjust_test.go @@ -46,6 +46,7 @@ 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{ @@ -61,6 +62,6 @@ func TestAdjustHelper(t *testing.T) { }, } // 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"`) + 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"`) } -- cgit v1.2.1