From 2ae631376b95ff0a59ea18c2c0befcd50135b020 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 29 May 2020 00:26:40 +0800 Subject: add limits for total columns, row and filename length --- excelize_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'excelize_test.go') diff --git a/excelize_test.go b/excelize_test.go index 5b65109..b31e1c8 100644 --- a/excelize_test.go +++ b/excelize_test.go @@ -166,6 +166,7 @@ func TestOpenFile(t *testing.T) { assert.NoError(t, f.SetCellStr("Sheet2", "c"+strconv.Itoa(i), strconv.Itoa(i))) } assert.NoError(t, f.SaveAs(filepath.Join("test", "TestOpenFile.xlsx"))) + assert.EqualError(t, f.SaveAs(filepath.Join("test", strings.Repeat("c", 199), ".xlsx")), "file name length exceeds maximum limit") } func TestSaveFile(t *testing.T) { -- cgit v1.2.1