Detect C++ language from all C++ file extensions

This commit is contained in:
Alan Hamlett 2019-03-11 11:20:23 +09:00
parent 9b2eabe568
commit 540557e998
15 changed files with 21 additions and 2 deletions

View file

View file

@ -0,0 +1,8 @@
#include <stdio.h>
#include <openssl/rand.h>
main()
{
printf("Hello World\n");
return 0;
}

View file

View file

View 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',