summaryrefslogtreecommitdiff
path: root/table_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-11-13 00:40:04 +0800
committerxuri <xuri.me@gmail.com>2022-11-13 00:40:04 +0800
commitac564afa56a691e378ab9bb04cb14bb283886a16 (patch)
treedef0303fd88e78897a3c739c31c89cff8f492d43 /table_test.go
parentbd5dd17673f767b9f4643423c77eec486f2ad53f (diff)
Remove internal error log print, throw XML deserialize error
Diffstat (limited to 'table_test.go')
-rw-r--r--table_test.go6
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) {