diff options
| author | Noel Peden <[email protected]> | 2019-12-18 16:52:58 -0800 |
|---|---|---|
| committer | Noel Peden <[email protected]> | 2019-12-18 16:52:58 -0800 |
| commit | 4c8be196347802a75ff3f2eb54fb183103a88776 (patch) | |
| tree | 24df50b911a44b55f7ed6667f407d456711908e5 /test | |
| parent | a9ec6cb6140367b4ad08bb743f9a22200c481c70 (diff) | |
| parent | 5cfccd88eba0f38d6576e44de7e0aa4c41f55f83 (diff) | |
| download | caxlsx-4c8be196347802a75ff3f2eb54fb183103a88776.tar.gz caxlsx-4c8be196347802a75ff3f2eb54fb183103a88776.zip | |
Merge branch 'master' of https://github.com/caxlsx/axlsx
Diffstat (limited to 'test')
| -rw-r--r-- | test/workbook/worksheet/tc_worksheet.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index fa8832d8..781f5250 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -29,6 +29,17 @@ class TestWorksheet < Test::Unit::TestCase assert_raises(ArgumentError) { @ws.name = 'foo?bar' } end + def test_exception_if_name_too_long + assert_nothing_raised { @ws.name = 'x' * 31 } + assert_raises(ArgumentError) { @ws.name = 'x' * 32 } + end + + def test_exception_if_name_too_long_because_of_multibyte_characters + three_byte_character = "✔" + assert_nothing_raised { @ws.name = 'x' * 28 + three_byte_character} + assert_raises(ArgumentError) { @ws.name = 'x' * 29 + three_byte_character } + end + def test_page_margins assert(@ws.page_margins.is_a? Axlsx::PageMargins) end |
