mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Make mac_format? private
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user