summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorJonathan Tron <[email protected]>2012-07-07 20:35:49 +0200
committerJonathan Tron <[email protected]>2012-07-07 20:35:49 +0200
commitc5981835dbcae425dd0e468a90d88cd49bea42d3 (patch)
treef412967582918a9642960b2f4540fec307b5984d /test
parentfb4f5feb9d38ee49142a18eb6a1921fd3567964f (diff)
downloadcaxlsx-c5981835dbcae425dd0e468a90d88cd49bea42d3.tar.gz
caxlsx-c5981835dbcae425dd0e468a90d88cd49bea42d3.zip
Fix a typo in `Axlsx::Worksheet#dimension` when a row was added without value.
When `Axlsx::Worksheet#add_row` is called without values `#dimension` returned "AA:200" instead of "AA200", which resulted in a dimension of "A1:AA:200". This lead to an error in `Axlsx.name_to_indices` which is then called with "200" instead of "AA200" when using `Axlsx::Worksheet#abs_auto_filter`.
Diffstat (limited to 'test')
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index 5dac2176..c930d06b 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -108,6 +108,11 @@ class TestWorksheet < Test::Unit::TestCase
assert_equal @ws.dimension, "A1:C2"
end
+ def test_dimension_with_empty_row
+ @ws.add_row
+ assert_equal "A1:AA200", @ws.dimension
+ end
+
def test_referencing
@ws.add_row [1, 2, 3]
@ws.add_row [4, 5, 6]