summaryrefslogtreecommitdiff
path: root/test/command_callback/test_gfortran_command_callback.vader
blob: 501e92fd2bf57c85251e82753d40d2167e225670 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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)))