test ruby_encoding

This commit is contained in:
Brian Lopez
2014-06-04 15:59:42 -05:00
parent 7e8be1293e
commit 42c68f21d1

View File

@@ -102,10 +102,17 @@ class TestBlob < Test::Unit::TestCase
def test_encoding
assert_equal "ISO-8859-2", blob("Text/README").encoding
assert_equal "ISO-8859-2", blob("Text/README").ruby_encoding
assert_equal "ISO-8859-1", blob("Text/dump.sql").encoding
assert_equal "ISO-8859-1", blob("Text/dump.sql").ruby_encoding
assert_equal "UTF-8", blob("Text/foo.txt").encoding
assert_equal "UTF-8", blob("Text/foo.txt").ruby_encoding
assert_equal "UTF-16LE", blob("Text/utf16le.txt").encoding
assert_equal "UTF-16LE", blob("Text/utf16le.txt").ruby_encoding
assert_equal "UTF-16LE", blob("Text/utf16le-windows.txt").encoding
assert_equal "UTF-16LE", blob("Text/utf16le-windows.txt").ruby_encoding
assert_equal "ISO-2022-KR", blob("Text/ISO-2022-KR.txt").encoding
assert_equal "binary", blob("Text/ISO-2022-KR.txt").ruby_encoding
assert_nil blob("Binary/dog.o").encoding
end