aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_roo.rb
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2023-02-08 00:40:16 -0500
committerLibravatarUnit 193 <unit193@unit193.net>2023-02-08 00:40:16 -0500
commitb0bc0772184c68b8d4baac678c5fb707dc23af7f (patch)
tree62c95563dd5d57e9db8268227acf4cc91e75af04 /test/test_roo.rb
parente44f5d5d1935ee40a6bbb232e649d91e8aa9ce74 (diff)
parentae103e148eb3c15606b816505492d870ef062ad3 (diff)
Update upstream source from tag 'upstream/2.10.0'
Update to upstream version '2.10.0' with Debian dir 3c0f78b1f632920ec992d7bf7e43a8b0ced0b21d
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?