diff options
| author | Randy Morgan <[email protected]> | 2013-09-30 09:53:29 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-09-30 09:53:29 +0900 |
| commit | 3a174bc69ac213939565da20e14eeb9e18d5413f (patch) | |
| tree | d61f6df7c40e498dd052ead6af9e992d11ce2ac1 /test | |
| parent | 09c9170e50ed4550015e34fdb54b7433bee0ef40 (diff) | |
| download | caxlsx-3a174bc69ac213939565da20e14eeb9e18d5413f.tar.gz caxlsx-3a174bc69ac213939565da20e14eeb9e18d5413f.zip | |
add name attribute to cell to create defined names for a single cell. https://github.com/randym/axlsx/issues/241
Diffstat (limited to 'test')
| -rw-r--r-- | test/workbook/worksheet/tc_cell.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb index 208b15e0..baa7a9f1 100644 --- a/test/workbook/worksheet/tc_cell.rb +++ b/test/workbook/worksheet/tc_cell.rb @@ -50,6 +50,12 @@ class TestCell < Test::Unit::TestCase assert_equal(@cAA.r_abs,"$AA$2", "needs to accept multi-digit columns") end + def test_name + @c.name = 'foo' + assert_equal(1, @ws.workbook.defined_names.size) + assert_equal('foo', @ws.workbook.defined_names.last.name) + end + def test_style assert_raise(ArgumentError, "must reject invalid style indexes") { @[email protected] } assert_nothing_raised("must allow valid style index changes") {@c.style=1} |
