summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-12 15:12:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-03-12 15:12:23 +0000
commit054ff0db8ee77fba9c61f38257be997b6d9ba7a3 (patch)
treec851290a015d6c43cade7a1a12026375d9d90804 /test
parent3dc4dbe302793ae735da15105d713c6d19d2d41e (diff)
downloadredmine-054ff0db8ee77fba9c61f38257be997b6d9ba7a3.tar.gz
redmine-054ff0db8ee77fba9c61f38257be997b6d9ba7a3.zip
Fixed: inline code with less-then/greater-than produces @lt; and @gt; (#1416).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3567 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
index 8cb98ba51..66e588ffb 100644
--- a/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
+++ b/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
@@ -60,4 +60,23 @@ class Redmine::WikiFormatting::TextileFormatterTest < HelperTestCase
end
end
end
+
+ def test_inline_code
+ to_test = {
+ 'this is @some code@' => 'this is <code>some code</code>',
+ '@<Location /redmine>@' => '<code>&lt;Location /redmine&gt;</code>',
+ }
+ to_test.each do |text, expected|
+ assert_equal "<p>#{expected}</p>", @formatter.new(text).to_html
+ end
+ end
+
+ def test_escaping
+ to_test = {
+ 'this is a <script>' => 'this is a &lt;script&gt;',
+ }
+ to_test.each do |text, expected|
+ assert_equal "<p>#{expected}</p>", @formatter.new(text).to_html
+ end
+ end
end