aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Tomayko <rtomayko@gmail.com>2012-09-10 01:52:30 -0700
committerRyan Tomayko <rtomayko@gmail.com>2012-09-10 01:52:30 -0700
commitbda895eaae1b06943daf006631f3ffb584d3dab9 (patch)
tree15ca8d6f352561ec7e2a9df7c7a379f5833c1d3e
parent2e49c06f47d63ac3de03de59ecd98466c83497a7 (diff)
Test Mac Format detection and line splitting
-rw-r--r--samples/Text/mac.txt1
-rw-r--r--test/test_blob.rb8
2 files changed, 9 insertions, 0 deletions
diff --git a/samples/Text/mac.txt b/samples/Text/mac.txt
new file mode 100644
index 0000000..c22612b
--- /dev/null
+++ b/samples/Text/mac.txt
@@ -0,0 +1 @@
+line 1 line 2 \ No newline at end of file
diff --git a/test/test_blob.rb b/test/test_blob.rb
index 17e9ef8..333b0ce 100644
--- a/test/test_blob.rb
+++ b/test/test_blob.rb
@@ -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