Test Mac Format detection and line splitting

This commit is contained in:
Ryan Tomayko
2012-09-10 01:52:30 -07:00
parent 2e49c06f47
commit bda895eaae
2 changed files with 9 additions and 0 deletions

1
samples/Text/mac.txt Normal file
View File

@@ -0,0 +1 @@
line 1

View File

@@ -65,6 +65,14 @@ class TestBlob < Test::Unit::TestCase
assert_equal ["module Foo", "end", ""], blob("Ruby/foo.rb").lines
end
def test_mac_format
assert blob("Text/mac.txt").mac_format?
end
def test_lines_mac_format
assert_equal ["line 1", "line 2", ""], blob("Text/mac.txt").lines
end
def test_size
assert_equal 15, blob("Ruby/foo.rb").size
end