test/tc_axlsx.rb in axlsx-1.3.4 vs test/tc_axlsx.rb in axlsx-1.3.5

- old
+ new

@@ -16,10 +16,19 @@ def test_cell_range_empty_if_no_cell assert_equal(Axlsx.cell_range([]), "") end + def test_do_not_trust_input_by_default + assert_equal false, Axlsx.trust_input + end + + + def test_trust_input_can_be_set_to_true + Axlsx.trust_input = true + assert_equal true, Axlsx.trust_input + end def test_cell_range_relative p = Axlsx::Package.new ws = p.workbook.add_worksheet row = ws.add_row c1 = row.add_cell @@ -50,8 +59,14 @@ end end def test_cell_r # todo + end + + def test_range_to_a + assert_equal([['A1', 'B1', 'C1']], Axlsx::range_to_a('A1:C1')) + assert_equal([['A1', 'B1', 'C1'], ['A2', 'B2', 'C2']], Axlsx::range_to_a('A1:C2')) + assert_equal([['Z5', 'AA5', 'AB5'], ['Z6', 'AA6', 'AB6']], Axlsx::range_to_a('Z5:AB6')) end end