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:
|
||||
major: true
|
||||
overrides:
|
||||
- .h
|
||||
extensions:
|
||||
- .c
|
||||
- .h
|
||||
@@ -124,6 +126,7 @@ C++:
|
||||
- .cpp
|
||||
- .cu
|
||||
- .cxx
|
||||
- .h
|
||||
- .h++
|
||||
- .hh
|
||||
- .hpp
|
||||
@@ -547,6 +550,7 @@ Objective-C:
|
||||
overrides:
|
||||
- .m
|
||||
extensions:
|
||||
- .h
|
||||
- .m
|
||||
- .mm
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ class TestLanguage < Test::Unit::TestCase
|
||||
include Linguist
|
||||
|
||||
def test_ambiguous_extensions
|
||||
assert Language.ambiguous?('.h')
|
||||
assert_equal Language['C'], Language.find_by_extension('h')
|
||||
|
||||
assert Language.ambiguous?('.m')
|
||||
assert_equal Language['Objective-C'], Language.find_by_extension('m')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user