diff options
author | r-uchino <46125593+r-uchino@users.noreply.github.com> | 2018-12-26 14:30:59 +0900 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2018-12-26 13:30:59 +0800 |
commit | 9b8baf75ad7613dba24635b4c66791e404c6b7d5 (patch) | |
tree | 4069b6e01db691f39cc51c78fc99335043334891 /excelize_test.go | |
parent | b04107c4a374dfc0a625d1513b0e5cb1d907260b (diff) |
Add RegSearchSheet (#316)
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 d082a5c..1995058 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -1268,6 +1268,19 @@ func TestSearchSheet(t *testing.T) { t.Log(xlsx.SearchSheet("Sheet1", "A")) } +func TestRegSearchSheet(t *testing.T) { + xlsx, err := OpenFile("./test/Book1.xlsx") + if err != nil { + t.Error(err) + return + } + t.Log(xlsx.SearchSheet("Sheet1", "[0-9]")) + // Test search in a not exists worksheet. + t.Log(xlsx.SearchSheet("Sheet4", "")) + // Test search a not exists value. + t.Log(xlsx.SearchSheet("Sheet1", "")) +} + func TestProtectSheet(t *testing.T) { xlsx := NewFile() xlsx.ProtectSheet("Sheet1", nil) |