Merge branch 'master' of git://github.com/korsakov/ohcount
[ohcount] / test / unit / html_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2
3 class Ohcount::HtmlTest < Ohcount::Test
4         def test_comprehensive
5                 verify_parse("html1.html")
6         end
7
8         def test_comment_entities
9                 assert_equal('<!--comment-->', entities_array(" <!--comment-->", 'html', :comment).first)
10                 assert_equal('/*comment*/', entities_array("<style type='text/css'>\n/*comment*/\n</style>", 'html', :comment).first)
11                 assert_equal('//comment', entities_array("<script type='text/javascript'>\n//comment\n</script>", 'html', :comment).first)
12                 assert_equal('/*comment*/', entities_array("<script type='text/javascript'>\n/*comment*/\n</script>", 'html', :comment).first)
13         end
14 end