diff options
Diffstat (limited to 'test/test_roo.rb')
| -rw-r--r-- | test/test_roo.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/test_roo.rb b/test/test_roo.rb index dae4a41..bd1188d 100644 --- a/test/test_roo.rb +++ b/test/test_roo.rb @@ -274,6 +274,24 @@ class TestRoo < Minitest::Test end end + def test_cell_boolean_from_google_sheets + with_each_spreadsheet(:name=>'boolean-from-google-sheets', :format=>[:openoffice, :excelx]) do |oo| + if oo.class == Roo::Excelx + assert_equal true, oo.cell(1, 1), "failure in #{oo.class}" + assert_equal false, oo.cell(2, 1), "failure in #{oo.class}" + + cell = oo.sheet_for(oo.default_sheet).cells[[1, 1,]] + assert_equal 'TRUE', cell.formatted_value + + cell = oo.sheet_for(oo.default_sheet).cells[[2, 1,]] + assert_equal 'FALSE', cell.formatted_value + else + assert_equal "true", oo.cell(1,1), "failure in #{oo.class}" + assert_equal "false", oo.cell(2,1), "failure in #{oo.class}" + end + end + end + def test_cell_multiline with_each_spreadsheet(:name=>'paragraph', :format=>[:openoffice, :excelx]) do |oo| assert_equal "This is a test\nof a multiline\nCell", oo.cell(1,1) @@ -282,6 +300,18 @@ class TestRoo < Minitest::Test end end + def test_apostrophe_replacement + with_each_spreadsheet(:name=>'apostrophe', :format=>[:openoffice]) do |oo| + assert_equal "'", oo.cell(1,1) + end + end + + def test_frozen_string_usage + with_each_spreadsheet(:name=>'frozen_string', :format=>[:openoffice]) do |oo| + assert_equal "", oo.cell(1,1) + end + end + def test_row_whitespace # auf dieses Dokument habe ich keinen Zugriff TODO: # TODO: No access to document whitespace? |
