summaryrefslogtreecommitdiff
path: root/cell_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-04-29 13:53:09 +0800
committerGitHub <noreply@github.com>2022-04-29 13:53:09 +0800
commit0f93bd23c97ac0f04fe8012bd4a262c851e44a82 (patch)
tree91df2abef72ff85e34f8001355d7af2c1068dc9e /cell_test.go
parentdf91b34a3f816a865ba6f9ea7707c668552df9d6 (diff)
This closes #1213, fix get incorrect rich text value caused by missing cell type checking
Diffstat (limited to 'cell_test.go')
-rw-r--r--cell_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cell_test.go b/cell_test.go
index 73b3018..77179cc 100644
--- a/cell_test.go
+++ b/cell_test.go
@@ -502,8 +502,13 @@ func TestGetCellRichText(t *testing.T) {
},
}
assert.NoError(t, f.SetCellRichText("Sheet1", "A1", runsSource))
+ assert.NoError(t, f.SetCellValue("Sheet1", "A2", false))
- runs, err := f.GetCellRichText("Sheet1", "A1")
+ runs, err := f.GetCellRichText("Sheet1", "A2")
+ assert.NoError(t, err)
+ assert.Equal(t, []RichTextRun(nil), runs)
+
+ runs, err = f.GetCellRichText("Sheet1", "A1")
assert.NoError(t, err)
assert.Equal(t, runsSource[0].Text, runs[0].Text)