summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/workbook/worksheet/tc_pivot_table_cache_definition.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_pivot_table_cache_definition.rb b/test/workbook/worksheet/tc_pivot_table_cache_definition.rb
index 282078b0..37d7e485 100644
--- a/test/workbook/worksheet/tc_pivot_table_cache_definition.rb
+++ b/test/workbook/worksheet/tc_pivot_table_cache_definition.rb
@@ -51,4 +51,12 @@ class TestPivotTableCacheDefinition < Test::Unit::TestCase
assert(errors.empty?, "error free validation")
end
+ def test_to_xml_string_for_special_characters
+ cell = @ws.rows.first.cells.first
+ cell.value = "&><'\""
+
+ doc = Nokogiri::XML(@cache_definition.to_xml_string)
+ errors = doc.errors
+ assert(errors.empty?, "invalid xml: #{errors.map(&:to_s).join(', ')}")
+ end
end