diff options
author | covv <xuri.me@qq.com> | 2018-10-27 22:54:17 +0800 |
---|---|---|
committer | covv <xuri.me@qq.com> | 2018-10-27 22:54:17 +0800 |
commit | 75edf1ac7d05854f36a518be0aecb397908adb76 (patch) | |
tree | 120a1a24d800b40974632c1af92b5cc1a227f605 /excelize_test.go | |
parent | b917466c71a51877cc34f9c1997b59196b06fddd (diff) |
Add testing case for the function `SearchSheet()`.
Diffstat (limited to 'excelize_test.go')
-rw-r--r-- | excelize_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/excelize_test.go b/excelize_test.go index 9f738f3..d021b55 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1195,6 +1195,19 @@ func TestHSL(t *testing.T) { t.Log(RGBToHSL(250, 50, 100)) } +func TestSearchSheet(t *testing.T) { + xlsx, err := OpenFile("./test/SharedStrings.xlsx") + if err != nil { + t.Error(err) + return + } + // Test search in a not exists worksheet. + t.Log(xlsx.SearchSheet("Sheet4", "")) + // Test search a not exists value. + t.Log(xlsx.SearchSheet("Sheet1", "X")) + t.Log(xlsx.SearchSheet("Sheet1", "A")) +} + func trimSliceSpace(s []string) []string { for { if len(s) > 0 && s[len(s)-1] == "" { |