summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGagbo <Gagbo@users.noreply.github.com>2017-06-24 13:38:16 +0200
committerw0rp <w0rp@users.noreply.github.com>2017-06-24 12:38:16 +0100
commite98560a349f3381c8fc6ecb6bf149c337dcf17be (patch)
tree7ad98b85b261aa3e085df5e7aaa558687c35955d /test
parent026c4f304ee69b81c80f9969c62353546c847c7a (diff)
downloadale-e98560a349f3381c8fc6ecb6bf149c337dcf17be.zip
Added builddir option to clang-tidy to point to json folder (#688)
Detect compille_commands.json files for clang-tidy
Diffstat (limited to 'test')
-rw-r--r--test/test_c_import_paths.vader15
-rw-r--r--test/test_c_projects/build/bad_folder_to_test_priority0
-rw-r--r--test/test_c_projects/build/compile_commands.json0
-rw-r--r--test/test_c_projects/json_project/build/compile_commands.json0
-rw-r--r--test/test_c_projects/json_project/include/test.h0
-rw-r--r--test/test_c_projects/json_project/subdir/dummy0
6 files changed, 15 insertions, 0 deletions
diff --git a/test/test_c_import_paths.vader b/test/test_c_import_paths.vader
index 66ff6dca..b867100a 100644
--- a/test/test_c_import_paths.vader
+++ b/test/test_c_import_paths.vader
@@ -226,3 +226,18 @@ Execute(The C++ Clang handler should include root directories for projects with
\ . ' -I' . ale#Escape(g:dir . '/test_c_projects/hpp_file_project') . ' '
\ . ' -'
\ , ale_linters#cpp#clang#GetCommand(bufnr(''))
+
+Execute(The C++ ClangTidy handler should include json folders for projects with suitable build directory in them):
+ runtime! ale_linters/cpp/clangtidy.vim
+
+ cd test_c_projects/json_project/subdir
+ silent noautocmd file file.cpp
+
+ " TODO Test to move to C-family tools tests
+ " AssertEqual
+ " \ '/testplugin/test/test_c_projects/json_project/build'
+ " \ , ale#c#FindCompileCommands(bufnr(''))
+
+ AssertEqual
+ \ 'clang-tidy -checks=''*'' %s -p ''/testplugin/test/test_c_projects/json_project/build'''
+ \ , ale_linters#cpp#clangtidy#GetCommand(bufnr(''))
diff --git a/test/test_c_projects/build/bad_folder_to_test_priority b/test/test_c_projects/build/bad_folder_to_test_priority
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/build/bad_folder_to_test_priority
diff --git a/test/test_c_projects/build/compile_commands.json b/test/test_c_projects/build/compile_commands.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/build/compile_commands.json
diff --git a/test/test_c_projects/json_project/build/compile_commands.json b/test/test_c_projects/json_project/build/compile_commands.json
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/json_project/build/compile_commands.json
diff --git a/test/test_c_projects/json_project/include/test.h b/test/test_c_projects/json_project/include/test.h
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/json_project/include/test.h
diff --git a/test/test_c_projects/json_project/subdir/dummy b/test/test_c_projects/json_project/subdir/dummy
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/test_c_projects/json_project/subdir/dummy