summaryrefslogtreecommitdiff
path: root/sheet_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'sheet_test.go')
-rw-r--r--sheet_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/sheet_test.go b/sheet_test.go
index 4e1e448..4b9d31e 100644
--- a/sheet_test.go
+++ b/sheet_test.go
@@ -91,6 +91,12 @@ func TestSearchSheet(t *testing.T) {
result, err = f.SearchSheet("Sheet1", "A")
assert.EqualError(t, err, "invalid cell reference [1, 0]")
assert.Equal(t, []string(nil), result)
+
+ // Test search sheet with unsupported charset shared strings table.
+ f.SharedStrings = nil
+ f.Pkg.Store(defaultXMLPathSharedStrings, MacintoshCyrillicCharset)
+ _, err = f.SearchSheet("Sheet1", "A")
+ assert.EqualError(t, err, "XML syntax error on line 1: invalid UTF-8")
}
func TestSetPageLayout(t *testing.T) {