summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-05-11 00:07:30 +0100
committerw0rp <devw0rp@gmail.com>2017-05-11 00:07:30 +0100
commitac707be619950d566fbdb3be7480ea07061e23b8 (patch)
treea257132f4ac74fc7eaa7c3edf7c6713af171482f /test
parent4e5a848d953c449a7655fb4e11e4c0cdf6254cac (diff)
downloadale-ac707be619950d566fbdb3be7480ea07061e23b8.zip
Remove the tests which run C compilers. They are too expensive and difficult to maintain
Diffstat (limited to 'test')
-rw-r--r--test/c_tests/broken.h1
-rw-r--r--test/c_tests/test_gcc.vader90
2 files changed, 0 insertions, 91 deletions
diff --git a/test/c_tests/broken.h b/test/c_tests/broken.h
deleted file mode 100644
index 3bd3571a..00000000
--- a/test/c_tests/broken.h
+++ /dev/null
@@ -1 +0,0 @@
-{{{
diff --git a/test/c_tests/test_gcc.vader b/test/c_tests/test_gcc.vader
deleted file mode 100644
index 0bf3eb1d..00000000
--- a/test/c_tests/test_gcc.vader
+++ /dev/null
@@ -1,90 +0,0 @@
-Before:
- Save g:ale_run_synchronously
- Save g:ale_linters
- Save g:ale_history_log_output
- Save g:ale_cpp_gcc_options
-
- silent! cd /testplugin/test/c_tests
-
- let g:ale_run_synchronously = 1
- let g:ale_linters = {'c': ['gcc'], 'cpp': ['g++']}
- let g:ale_history_log_output = 1
- let g:ale_cpp_gcc_options = '-Wall'
-
- function! GetCommandOutput()
- if empty(g:ale_buffer_info[bufnr('')].history)
- return ''
- endif
-
- return join(g:ale_buffer_info[bufnr('')].history[-1].output, "\n")
- endfunction
-
-After:
- Restore
- delfunction GetCommandOutput
- call ale#linter#Reset()
- call ale#engine#SetResults(bufnr(''), [])
- call ale#cleanup#Buffer(bufnr(''))
-
-Given c (A test C file):
- int main() {
- return 0
- }
-
-Execute(Basic errors should be returned for GCC for C files):
- call ale#Lint()
-
- AssertEqual
- \ [{'lnum': 3, 'col': 1}],
- \ map(getloclist(0), '{''lnum'': v:val.lnum, ''col'': v:val.col}')
-
- Assert match(getloclist(0)[0].text, '\v^expected .*;.* before .*\}.* token$') >= 0,
- \ 'Invalid error text: ' . getloclist(0)[0].text
-
-Given cpp (A test C++ file):
- int main() {
- return 0
- }
-
-Execute(Basic errors should be returned for GCC for C++ files):
- call ale#Lint()
-
- AssertEqual
- \ [{'lnum': 3, 'col': 1}],
- \ map(getloclist(0), '{''lnum'': v:val.lnum, ''col'': v:val.col}')
-
- Assert match(getloclist(0)[0].text, '\v^expected .*;.* before .*\}.* token$') >= 0,
-
-Given c (A test C file with a header containing broken code):
- // Some comment line
- #include "broken.h"
-
- int main() {
- return 0
- }
-
-Execute(Basic errors should be returned for GCC for C files with headers):
- call ale#Lint()
-
- AssertEqual
- \ [{'lnum': 2, 'col': 0}],
- \ map(getloclist(0), '{''lnum'': v:val.lnum, ''col'': v:val.col}')
-
- AssertEqual 'Problems were found in the header (See :ALEDetail)', getloclist(0)[0].text
-
-Given cpp (A test C++ file with a header containing broken code):
- // Some comment line
- #include "broken.h"
-
- int main() {
- return 0
- }
-
-Execute(Basic errors should be returned for GCC for C++ files with headers):
- call ale#Lint()
-
- AssertEqual
- \ [{'lnum': 2, 'col': 0}],
- \ map(getloclist(0), '{''lnum'': v:val.lnum, ''col'': v:val.col}')
-
- AssertEqual 'Problems were found in the header (See :ALEDetail)', getloclist(0)[0].text