summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-03-12 16:13:43 -0700
committerRandy Morgan <[email protected]>2012-03-12 16:13:43 -0700
commit547c5e6acfe64c61550acb70cea235e4e9f89f0e (patch)
treec39c450377f8cbb2f6c0bcb311fb399629242530 /test
parent111292baa50b06445e181c0cb2284bf68117ab4a (diff)
parentccd59b3d88907da35a3cded14ba9cfa3a6379bd2 (diff)
downloadcaxlsx-547c5e6acfe64c61550acb70cea235e4e9f89f0e.tar.gz
caxlsx-547c5e6acfe64c61550acb70cea235e4e9f89f0e.zip
Merge pull request #49 from joekain/r_abs
Fix Cell#r_abs to handle multi-digit row numbers and multi-letter column ids.
Diffstat (limited to 'test')
-rw-r--r--test/workbook/worksheet/tc_cell.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb
index 97a9951b..efaee3ac 100644
--- a/test/workbook/worksheet/tc_cell.rb
+++ b/test/workbook/worksheet/tc_cell.rb
@@ -9,6 +9,8 @@ class TestCell < Test::Unit::TestCase
p.workbook.styles.add_style :sz=>20
@row = @ws.add_row
@c = @row.add_cell 1, :type=>:float, :style=>1
+ @ws.add_row (0..26).map { |index| index }
+ @cAA = @ws["AA2"]
end
def test_initialize
@@ -42,6 +44,7 @@ class TestCell < Test::Unit::TestCase
def test_r_abs
assert_equal(@c.r_abs,"$A$1", "calculate absolute cell reference")
+ assert_equal(@cAA.r_abs,"$AA$2", "needs to accept multi-digit columns")
end
def test_style