diff options
| author | Randy Morgan <[email protected]> | 2013-06-23 10:36:03 +0100 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2013-06-23 10:36:03 +0100 |
| commit | 4954543cc0892008f580f05cfb810fb0986b107f (patch) | |
| tree | 10d60edecb17725bf2c5e48bac110d2ff3d73638 /test/workbook/worksheet/tc_conditional_formatting.rb | |
| parent | d7ce6f10daad57fc28ca79e10d673f7bc4512673 (diff) | |
| download | caxlsx-4954543cc0892008f580f05cfb810fb0986b107f.tar.gz caxlsx-4954543cc0892008f580f05cfb810fb0986b107f.zip | |
escape formula for conditional formatting
Diffstat (limited to 'test/workbook/worksheet/tc_conditional_formatting.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_conditional_formatting.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb index 42e29fa6..9e5e01cf 100644 --- a/test/workbook/worksheet/tc_conditional_formatting.rb +++ b/test/workbook/worksheet/tc_conditional_formatting.rb @@ -131,9 +131,11 @@ class TestConditionalFormatting < Test::Unit::TestCase end def test_multiple_formulas - @ws.add_conditional_formatting "B3:B3", { :type => :cellIs, :dxfId => 0, :priority => 1, :operator => :between, :formula => ["1","5"] } + @ws.add_conditional_formatting "B3:B3", { :type => :cellIs, :dxfId => 0, :priority => 1, :operator => :between, :formula => ["1 <> 2","5"] } doc = Nokogiri::XML.parse(@ws.to_xml_string) - assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='1'") + p doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']") + + assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='1 <> 2'") assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='5'") end |
