Make mac_format? private

This commit is contained in:
Joshua Peek
2013-06-09 20:48:45 -05:00
parent 91284e5530
commit c7100be139
2 changed files with 2 additions and 6 deletions

View File

@@ -250,7 +250,7 @@ module Linguist
@line_split_character ||= (mac_format?? "\r" : "\n")
end
# Public: Is the data in ** Mac Format **. This format uses \r (0x0d) characters
# Private: Is the data in ** Mac Format **. This format uses \r (0x0d) characters
# for line ends and does not include a \n (0x0a).
#
# Returns true when mac format is detected.

View File

@@ -65,13 +65,9 @@ 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?
assert !blob("Emacs Lisp/ess-julia.el").mac_format?
end
def test_lines_mac_format
assert_equal ["line 1", "line 2", ""], blob("Text/mac.txt").lines
assert_equal 473, blob("Emacs Lisp/ess-julia.el").lines.length
end
def test_size