diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-29 16:05:49 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-29 16:05:49 +0100 |
commit | 7e0cdb53ecf9c94bb8777a57de8bf2aacca46b5d (patch) | |
tree | ed3a73c3128f80dd96e5f9409a64fdb1c4183226 /test/test_c_flag_parsing.vader | |
parent | bc3a843e102d4490b2476b53531807ab624417e7 (diff) | |
download | ale-7e0cdb53ecf9c94bb8777a57de8bf2aacca46b5d.zip |
Fix #3247 - Use --always-make for make -n by default
Diffstat (limited to 'test/test_c_flag_parsing.vader')
-rw-r--r-- | test/test_c_flag_parsing.vader | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/test_c_flag_parsing.vader b/test/test_c_flag_parsing.vader index 076be6a1..99722b17 100644 --- a/test/test_c_flag_parsing.vader +++ b/test/test_c_flag_parsing.vader @@ -1,9 +1,13 @@ Before: Save g:ale_c_parse_makefile + Save g:ale_c_always_make + Save b:ale_c_always_make call ale#test#SetDirectory('/testplugin/test') let g:ale_c_parse_makefile = 1 + let g:ale_c_always_make = 1 + let b:ale_c_always_make = 1 function SplitAndParse(path_prefix, command) abort let l:args = ale#c#ShellSplit(a:command) @@ -18,6 +22,22 @@ After: call ale#test#RestoreDirectory() +Execute(The make command should be correct): + call ale#test#SetFilename('test_c_projects/makefile_project/subdir/file.c') + + AssertEqual + \ ale#path#CdString(ale#path#Simplify(g:dir. '/test_c_projects/makefile_project')) + \ . 'make -n --always-make', + \ ale#c#GetMakeCommand(bufnr('')) + + " You should be able to disable --always-make for a buffer. + let b:ale_c_always_make = 0 + + AssertEqual + \ ale#path#CdString(ale#path#Simplify(g:dir. '/test_c_projects/makefile_project')) + \ . 'make -n', + \ ale#c#GetMakeCommand(bufnr('')) + Execute(The CFlags parser should be able to parse include directives): call ale#test#SetFilename('test_c_projects/makefile_project/subdir/file.c') |