diff options
author | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
commit | 324f87bcaed9ec775c0b79627956a093ad481d36 (patch) | |
tree | 56a779bde041b3dae82ab0f2e827ed0021c3d602 /col_test.go | |
parent | 96917e4617c9e7eb15c0ee1723a042f169321430 (diff) |
add checking and limits for the worksheet
Diffstat (limited to 'col_test.go')
-rw-r--r-- | col_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/col_test.go b/col_test.go index e6e7e29..02c5ca2 100644 --- a/col_test.go +++ b/col_test.go @@ -236,6 +236,8 @@ func TestOutlineLevel(t *testing.T) { assert.EqualError(t, err, "sheet Shee2 is not exist") assert.NoError(t, f.SetColWidth("Sheet2", "A", "D", 13)) + assert.EqualError(t, f.SetColWidth("Sheet2", "A", "D", MaxColumnWidth+1), "the width of the column must be smaller than or equal to 255 characters") + assert.NoError(t, f.SetColOutlineLevel("Sheet2", "B", 2)) assert.NoError(t, f.SetRowOutlineLevel("Sheet1", 2, 7)) assert.EqualError(t, f.SetColOutlineLevel("Sheet1", "D", 8), "invalid outline level") |