summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_conditional_formatting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/workbook/worksheet/tc_conditional_formatting.rb')
-rw-r--r--test/workbook/worksheet/tc_conditional_formatting.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_conditional_formatting.rb b/test/workbook/worksheet/tc_conditional_formatting.rb
index 087fd40e..42e29fa6 100644
--- a/test/workbook/worksheet/tc_conditional_formatting.rb
+++ b/test/workbook/worksheet/tc_conditional_formatting.rb
@@ -130,6 +130,13 @@ class TestConditionalFormatting < Test::Unit::TestCase
assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='greaterThan']//xmlns:formula='0.5'")
end
+ def test_multiple_formulas
+ @ws.add_conditional_formatting "B3:B3", { :type => :cellIs, :dxfId => 0, :priority => 1, :operator => :between, :formula => ["1","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'")
+ assert doc.xpath("//xmlns:worksheet/xmlns:conditionalFormatting//xmlns:cfRule[@type='cellIs'][@dxfId=0][@priority=1][@operator='between']//xmlns:formula='5'")
+ end
+
def test_sqref
assert_raise(ArgumentError) { @cf.sqref = 10 }
assert_nothing_raised { @cf.sqref = "A1:A1" }