From cf97118bfe48eb36b82c4a833b51d3ea4bfffa97 Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Sat, 13 May 2017 14:12:43 +0800 Subject: - The max author and text in comment limit added; - go doc and go test updated --- excelize_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'excelize_test.go') diff --git a/excelize_test.go b/excelize_test.go index 38c299d..a5cc657 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -529,8 +529,12 @@ func TestAddComments(t *testing.T) { if err != nil { t.Log(err) } - xlsx.AddComment("Sheet1", "A30", `{"author":"Excelize","text":"This is first comment."}`) - xlsx.AddComment("Sheet2", "B7", `{"author":"Excelize","text":"This is second comment."}`) + var s = "c" + for i := 0; i < 32767; i++ { + s += "c" + } + xlsx.AddComment("Sheet1", "A30", `{"author":"`+s+`","text":"`+s+`"}`) + xlsx.AddComment("Sheet2", "B7", `{"author":"Excelize: ","text":"This is a comment."}`) err = xlsx.Save() if err != nil { t.Log(err) -- cgit v1.2.1