summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_worksheet.rb
diff options
context:
space:
mode:
authorJurriaan Pruis <[email protected]>2014-01-15 23:44:02 +0100
committerJurriaan Pruis <[email protected]>2014-02-26 20:09:21 +0100
commitbe8e00332c73439cf17083173ea74f1505100df9 (patch)
tree383ec2e23fc0a14aa5ad90e139648a79814eeded /test/workbook/worksheet/tc_worksheet.rb
parenta271a7d0f26ecb26d01aad00e094744d6fe8b0d2 (diff)
downloadcaxlsx-be8e00332c73439cf17083173ea74f1505100df9.tar.gz
caxlsx-be8e00332c73439cf17083173ea74f1505100df9.zip
Huge refactoring
Do not create huge strings Let Row inherit from SimpleTypedList Optimized sanitizing Optimized validation And more..
Diffstat (limited to 'test/workbook/worksheet/tc_worksheet.rb')
-rw-r--r--test/workbook/worksheet/tc_worksheet.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb
index 74253613..b399b306 100644
--- a/test/workbook/worksheet/tc_worksheet.rb
+++ b/test/workbook/worksheet/tc_worksheet.rb
@@ -398,10 +398,13 @@ class TestWorksheet < Test::Unit::TestCase
end
def test_to_xml_string_with_illegal_chars
+ old = Axlsx::trust_input
+ Axlsx::trust_input = false
nasties = "\v\u2028\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\u001f"
@ws.add_row [nasties]
- assert_equal(0, @ws.rows.last.cells.last.value.index("\v"))
- assert_equal(nil,@ws.to_xml_string.index("\v"))
+ assert_equal(nil, @ws.rows.last.cells.last.value.index("\v"))
+ assert_equal(nil, @ws.to_xml_string.index("\v"))
+ Axlsx::trust_input = old
end
def test_to_xml_string_with_newlines