test/test_roo.rb in roo-0.2.6 vs test/test_roo.rb in roo-0.2.7

- old
+ new

@@ -676,6 +676,32 @@ assert_equal "0.01:percentage",oo.cell(5, 3)+":"+oo.celltype(5, 3) end + def test_latlondata + #-- this testfile contains confident data and will not be released in the public + if File.exist?(File.join("test","latlondata.xls")) + oo = Excel.new(File.join("test","latlondata.xls")) + #oo = Excel.new("numbers1.xls") + oo.default_sheet = 2 + 5.upto(oo.last_row) do |line| + waypoint = oo.cell(line,'V') + desc = oo.cell(line,'W') + color = oo.cell(line,'X') + symbol = oo.cell(line,'Y') + longitude = oo.cell(line,'Z') + latitude = oo.cell(line,'AA') + alt = oo.cell(line,'AB') + if waypoint + puts "#{waypoint}\t#{desc}\t#{color}\t#{symbol}\t#{longitude.to_f}\t#{latitude.to_f}\t#{alt.to_f}" + end + end + #-- + assert_equal "[1] KLAR (takeoff)", oo.cell('V',5) + assert_equal "takeoff LAR (VFR)", oo.cell('w',5) + assert_equal -105.675, oo.cell('Z',5) + assert_equal 41.31205555, oo.cell('AA',5) + assert_equal 2218.3344, oo.cell('AB',5) + end + end end # class