diff options
author | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 |
commit | ac564afa56a691e378ab9bb04cb14bb283886a16 (patch) | |
tree | def0303fd88e78897a3c739c31c89cff8f492d43 /table_test.go | |
parent | bd5dd17673f767b9f4643423c77eec486f2ad53f (diff) |
Remove internal error log print, throw XML deserialize error
Diffstat (limited to 'table_test.go')
-rw-r--r-- | table_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/table_test.go b/table_test.go index 409b49f..5ac464b 100644 --- a/table_test.go +++ b/table_test.go @@ -78,9 +78,13 @@ func TestAutoFilter(t *testing.T) { }) } - // Test AutoFilter with illegal cell reference. + // Test add auto filter with illegal cell reference. assert.EqualError(t, f.AutoFilter("Sheet1", "A", "B1", ""), newCellNameToCoordinatesError("A", newInvalidCellNameError("A")).Error()) assert.EqualError(t, f.AutoFilter("Sheet1", "A1", "B", ""), newCellNameToCoordinatesError("B", newInvalidCellNameError("B")).Error()) + // Test add auto filter with unsupported charset workbook. + f.WorkBook = nil + f.Pkg.Store(defaultXMLPathWorkbook, MacintoshCyrillicCharset) + assert.EqualError(t, f.AutoFilter("Sheet1", "D4", "B1", formats[0]), "XML syntax error on line 1: invalid UTF-8") } func TestAutoFilterError(t *testing.T) { |