diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/workbook/worksheet/tc_cell.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_cell.rb b/test/workbook/worksheet/tc_cell.rb index edb3ae85..6a93fc58 100644 --- a/test/workbook/worksheet/tc_cell.rb +++ b/test/workbook/worksheet/tc_cell.rb @@ -251,6 +251,16 @@ class TestCell < Test::Unit::TestCase assert_equal(c_xml.xpath("/c[@s=1]").size, 1) end + def test_to_xml_string_formula + p = Axlsx::Package.new + ws = p.workbook.add_worksheet do |ws| + ws.add_row ["=IF(2+2=4,4,5)"] + end + doc = Nokogiri::XML(ws.to_xml_string) + assert("//f[text()=['IF(2+2=4,4,5)']") + + end + def test_to_xml # TODO This could use some much more stringent testing related to the xml content generated! row = @ws.add_row [Time.now, Date.today, true, 1, 1.0, "text", "=sum(A1:A2)"] |
