Detect C++ language from all C++ file extensions
This commit is contained in:
parent
9b2eabe568
commit
540557e998
15 changed files with 21 additions and 2 deletions
0
tests/samples/codefiles/c_and_cxx/cpp.h
Normal file
0
tests/samples/codefiles/c_and_cxx/cpp.h
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.h
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.h
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.m
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.m
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.mm
Normal file
0
tests/samples/codefiles/c_and_cxx/empty.mm
Normal file
0
tests/samples/codefiles/c_and_cxx/foo.cxx
Normal file
0
tests/samples/codefiles/c_and_cxx/foo.cxx
Normal file
8
tests/samples/codefiles/c_and_cxx/non_empty.cxx
Normal file
8
tests/samples/codefiles/c_and_cxx/non_empty.cxx
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <openssl/rand.h>
|
||||
|
||||
main()
|
||||
{
|
||||
printf("Hello World\n");
|
||||
return 0;
|
||||
}
|
0
tests/samples/codefiles/c_and_cxx/non_empty.h
Normal file
0
tests/samples/codefiles/c_and_cxx/non_empty.h
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-c.h
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-c.h
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-c.m
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-c.m
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-cpp.h
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-cpp.h
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-cpp.mm
Normal file
0
tests/samples/codefiles/c_and_cxx/objective-cpp.mm
Normal file
0
tests/samples/codefiles/c_and_cxx/see.c
Normal file
0
tests/samples/codefiles/c_and_cxx/see.c
Normal file
0
tests/samples/codefiles/c_and_cxx/see.h
Normal file
0
tests/samples/codefiles/c_and_cxx/see.h
Normal file
|
@ -69,6 +69,12 @@ class LanguagesTestCase(utils.TestCase):
|
|||
entity='c_and_cpp/cpp.h',
|
||||
)
|
||||
|
||||
def test_cpp_language_detected_for_header_with_c_and_cxx_files_in_folder(self):
|
||||
self.shared(
|
||||
expected_language='C++',
|
||||
entity='c_and_cxx/cpp.h',
|
||||
)
|
||||
|
||||
def test_c_not_detected_for_non_header_with_c_files_in_folder(self):
|
||||
self.shared(
|
||||
expected_language='Python',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue