summaryrefslogtreecommitdiff
path: root/excelize_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'excelize_test.go')
-rw-r--r--excelize_test.go21
1 files changed, 5 insertions, 16 deletions
diff --git a/excelize_test.go b/excelize_test.go
index e4b2548..c7c3aec 100644
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -182,6 +182,11 @@ func TestSaveAsWrongPath(t *testing.T) {
}
}
+func TestOpenReader(t *testing.T) {
+ _, err := OpenReader(strings.NewReader(""))
+ assert.EqualError(t, err, "zip: not a valid zip file")
+}
+
func TestBrokenFile(t *testing.T) {
// Test write file with broken file struct.
f := File{}
@@ -1033,22 +1038,6 @@ func TestHSL(t *testing.T) {
t.Log(RGBToHSL(250, 50, 100))
}
-func TestSearchSheet(t *testing.T) {
- f, err := OpenFile(filepath.Join("test", "SharedStrings.xlsx"))
- if !assert.NoError(t, err) {
- t.FailNow()
- }
-
- // Test search in a not exists worksheet.
- t.Log(f.SearchSheet("Sheet4", ""))
- // Test search a not exists value.
- t.Log(f.SearchSheet("Sheet1", "X"))
- t.Log(f.SearchSheet("Sheet1", "A"))
- // Test search the coordinates where the numerical value in the range of
- // "0-9" of Sheet1 is described by regular expression:
- t.Log(f.SearchSheet("Sheet1", "[0-9]", true))
-}
-
func TestProtectSheet(t *testing.T) {
f := NewFile()
f.ProtectSheet("Sheet1", nil)