mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
.h is ambiguous
This commit is contained in:
@@ -101,6 +101,8 @@ Brainfuck:
|
|||||||
|
|
||||||
C:
|
C:
|
||||||
major: true
|
major: true
|
||||||
|
overrides:
|
||||||
|
- .h
|
||||||
extensions:
|
extensions:
|
||||||
- .c
|
- .c
|
||||||
- .h
|
- .h
|
||||||
@@ -124,6 +126,7 @@ C++:
|
|||||||
- .cpp
|
- .cpp
|
||||||
- .cu
|
- .cu
|
||||||
- .cxx
|
- .cxx
|
||||||
|
- .h
|
||||||
- .h++
|
- .h++
|
||||||
- .hh
|
- .hh
|
||||||
- .hpp
|
- .hpp
|
||||||
@@ -547,6 +550,7 @@ Objective-C:
|
|||||||
overrides:
|
overrides:
|
||||||
- .m
|
- .m
|
||||||
extensions:
|
extensions:
|
||||||
|
- .h
|
||||||
- .m
|
- .m
|
||||||
- .mm
|
- .mm
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ class TestLanguage < Test::Unit::TestCase
|
|||||||
include Linguist
|
include Linguist
|
||||||
|
|
||||||
def test_ambiguous_extensions
|
def test_ambiguous_extensions
|
||||||
|
assert Language.ambiguous?('.h')
|
||||||
|
assert_equal Language['C'], Language.find_by_extension('h')
|
||||||
|
|
||||||
assert Language.ambiguous?('.m')
|
assert Language.ambiguous?('.m')
|
||||||
assert_equal Language['Objective-C'], Language.find_by_extension('m')
|
assert_equal Language['Objective-C'], Language.find_by_extension('m')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user