Class | Html5EncodingTestCase |
In: |
lib/feed_tools/vendor/html5/tests/test_encoding.rb
|
Parent: | Test::Unit::TestCase |
# File lib/feed_tools/vendor/html5/tests/test_encoding.rb, line 13 13: def test_chardet #TODO: can we get rid of this? 14: file = File.open(File.join(TESTDATA_DIR, 'encoding', 'chardet', 'test_big5.txt'), 'r') 15: stream = HTML5::HTMLInputStream.new(file, :chardet => true) 16: assert_equal 'big5', stream.char_encoding.downcase 17: rescue LoadError 18: puts "chardet not found, skipping chardet tests" 19: end