aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_roo.rb
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-02-08 00:39:56 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2023-02-08 00:39:56 -0500
commitae103e148eb3c15606b816505492d870ef062ad3 (patch)
treeb7916225d76ac8d1db28feff7aa46a4ee672b3dc /test/test_roo.rb
parentf5fb17e5a64b215644bc104f099dad8c2f10c37d (diff)
New upstream version 2.10.0.upstream/2.10.0
Diffstat (limited to 'test/test_roo.rb')
-rw-r--r--test/test_roo.rb30
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?