test/test_roo.rb in roo-0.0.2 vs test/test_roo.rb in roo-0.0.3

- old
+ new

@@ -45,20 +45,35 @@ assert_equal "tata", oo.cell(6,1) assert_equal "tata", oo.cell(6,'A') assert_equal "tata", oo.cell('A',6) assert_equal "tata", oo.cell(6,'a') assert_equal "tata", oo.cell('a',6) + assert_equal "thisisc8", oo.cell(8,3) assert_equal "thisisc8", oo.cell(8,'C') assert_equal "thisisc8", oo.cell('C',8) assert_equal "thisisc8", oo.cell(8,'c') assert_equal "thisisc8", oo.cell('c',8) + + assert_equal "thisisd9", oo.cell('d',9) + assert_equal "thisisa11", oo.cell('a',11) end # Version of the (XML) office document # please note that "1.0" is returned even if it was created with OpenOffice V. 2.0 def test_officeversion oo = Openoffice.new("test/numbers1.ods") assert_equal "1.0", oo.officeversion + end + + def test_rows + oo = Openoffice.new("test/numbers1.ods") + oo.default_sheet = oo.sheets.first + assert_equal 41, oo.cell('a',12) + assert_equal 42, oo.cell('b',12) + assert_equal 43, oo.cell('c',12) + assert_equal 44, oo.cell('d',12) + assert_equal 45, oo.cell('e',12) + assert_equal [41.0,42.0,43.0,44.0,45.0], oo.row(12) end end