test/test_roo.rb in roo-1.12.2 vs test/test_roo.rb in roo-1.13.0

- old
+ new

@@ -1540,10 +1540,25 @@ assert_equal '5026', oo.cell(2,3) assert_equal '5026', oo.cell(3,3) end end + + def test_excel_links + with_each_spreadsheet(:name=>'link', :format=>:excel) do |oo| + assert_equal 'Google', oo.cell(1,1) + assert_equal 'http://www.google.com', oo.cell(1,1).url + end + end + + def test_excelx_links + with_each_spreadsheet(:name=>'link', :format=>:excelx) do |oo| + assert_equal 'Google', oo.cell(1,1) + assert_equal 'http://www.google.com', oo.cell(1,1).url + end + end + # Excel has two base date formats one from 1900 and the other from 1904. # There's a MS bug that 1900 base dates include an extra day due to erroneously # including 1900 as a leap yar. def test_base_dates_in_excel with_each_spreadsheet(:name=>'1900_base', :format=>:excel) do |oo| @@ -1766,9 +1781,19 @@ oo.default_sheet = 'Sheet3' assert_equal Matrix[ [1.0, nil, 3.0], [4.0, 5.0, 6.0], [7.0, 8.0, nil] ], oo.to_matrix(1,1,3,3) + end + end + + def test_matrix_specifying_sheet + with_each_spreadsheet(:name => 'matrix', :format => [:openoffice, :excel, :google]) do |oo| + oo.default_sheet = oo.sheets.first + assert_equal Matrix[ + [1.0, nil, 3.0], + [4.0, 5.0, 6.0], + [7.0, 8.0, nil] ], oo.to_matrix(nil, nil, nil, nil, 'Sheet3') end end # unter Windows soll es laut Bug-Reports nicht moeglich sein, eine Excel-Datei, die # mit Excel.new geoeffnet wurde nach dem Processing anschliessend zu loeschen.