diff options
author | w0rp <devw0rp@gmail.com> | 2017-04-15 22:06:56 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-04-15 22:06:56 +0100 |
commit | 7682fab2947ea13b2427bfdf2b42c30168712f92 (patch) | |
tree | 780be6c292fe8a4b72889de898cb3a1fa58bf292 /test/command_callback | |
parent | d82446623094689686f41280a3eb45fb3336b69e (diff) | |
download | ale-7682fab2947ea13b2427bfdf2b42c30168712f92.zip |
Fix #168 - Make the Fortran linter more configurable
Diffstat (limited to 'test/command_callback')
-rw-r--r-- | test/command_callback/test_gfortran_command_callback.vader | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/command_callback/test_gfortran_command_callback.vader b/test/command_callback/test_gfortran_command_callback.vader new file mode 100644 index 00000000..501e92fd --- /dev/null +++ b/test/command_callback/test_gfortran_command_callback.vader @@ -0,0 +1,31 @@ +Before: + runtime ale_linters/fortran/gcc.vim + +After: + call ale#linter#Reset() + let g:ale_fortran_gcc_options = '-Wall' + let g:ale_fortran_gcc_use_free_form = 1 + let g:ale_fortran_gcc_executable = 'gcc' + +Execute(The fortran gcc command callback should return the correct default string): + AssertEqual 'gcc -S -x f95 -fsyntax-only -ffree-form -Wall -', + \ join(split(ale_linters#fortran#gcc#GetCommand(1))) + +Execute(The fortran gcc command callback should let you set options): + let g:ale_fortran_gcc_options = '-Wotherthings' + + AssertEqual 'gcc -S -x f95 -fsyntax-only -ffree-form -Wotherthings -', + \ join(split(ale_linters#fortran#gcc#GetCommand(1))) + +Execute(The fortran gcc command callback should let you use -ffixed-form): + let g:ale_fortran_gcc_use_free_form = 0 + + AssertEqual 'gcc -S -x f95 -fsyntax-only -ffixed-form -Wall -', + \ join(split(ale_linters#fortran#gcc#GetCommand(1))) + +Execute(The fortran executable should be configurable): + let g:ale_fortran_gcc_executable = 'gfortran' + + AssertEqual 'gfortran', ale_linters#fortran#gcc#GetExecutable(1) + AssertEqual 'gfortran -S -x f95 -fsyntax-only -ffree-form -Wall -', + \ join(split(ale_linters#fortran#gcc#GetCommand(1))) |