Permalink
Browse files

PDF: add \\(double backslashes) handling of FPDF ANSI test in unit li…

…b test (#61, #117).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5342 e93f8b46-1217-0410-a6f0-8f06a7374b81
  • Loading branch information...
1 parent 73a2485 commit 470ff0c6e5838e124704b28834a85005210a783f @marutosi marutosi committed Apr 6, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/unit/lib/redmine/export/pdf_test.rb
@@ -31,4 +31,17 @@ def test_fix_text_encoding_backslash_ascii
assert_equal '\\\\abcd\\\\abcd\\\\',
pdf.fix_text_encoding('\\abcd\\abcd\\')
end
+
+ def test_fix_text_encoding_double_backslash_ascii
+ set_language_if_valid 'ja'
+ pdf = Redmine::Export::PDF::IFPDF.new('ja')
+ assert pdf
+ assert_equal '\\\\\\\\abcd', pdf.fix_text_encoding('\\\\abcd')
+ assert_equal 'abcd\\\\\\\\', pdf.fix_text_encoding('abcd\\\\')
+ assert_equal 'ab\\\\\\\\cd', pdf.fix_text_encoding('ab\\\\cd')
+ assert_equal 'ab\\\\\\\\cd\\\\de', pdf.fix_text_encoding('ab\\\\cd\\de')
+ assert_equal '\\\\\\\\abcd\\\\\\\\', pdf.fix_text_encoding('\\\\abcd\\\\')
+ assert_equal '\\\\\\\\abcd\\\\\\\\abcd\\\\\\\\',
+ pdf.fix_text_encoding('\\\\abcd\\\\abcd\\\\')
+ end
end

0 comments on commit 470ff0c

Please sign in to comment.