summaryrefslogtreecommitdiff
path: root/test/unit/html.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/html.rb')
-rw-r--r--test/unit/html.rb10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/unit/html.rb b/test/unit/html.rb
index 750b6c9..9175a4f 100644
--- a/test/unit/html.rb
+++ b/test/unit/html.rb
@@ -3,6 +3,10 @@ require 'coderay'
class HtmlTest < Test::Unit::TestCase
+ def normalize_html html
+ html.gsub('&#39;', "'").gsub('&quot;', '"')
+ end
+
def test_break_lines_option
snippets = {}
@@ -95,9 +99,9 @@ public class Test {
for lang, code in snippets
tokens = CodeRay.scan code[:in], lang
- assert_equal code[:expected_with_option_off], tokens.html
- assert_equal code[:expected_with_option_off], tokens.html(:break_lines => false)
- assert_equal code[:expected_with_option_on], tokens.html(:break_lines => true)
+ assert_equal code[:expected_with_option_off], normalize_html(tokens.html)
+ assert_equal code[:expected_with_option_off], normalize_html(tokens.html(:break_lines => false))
+ assert_equal code[:expected_with_option_on], normalize_html(tokens.html(:break_lines => true))
end
end
end