|
|
@@ -105,6 +105,8 @@ Before: |
|
|
|
AssertEqual a:expected_list, split(l:output, "\n") |
|
|
|
endfunction |
|
|
|
|
|
|
|
call ale#test#SetDirectory('/testplugin/test') |
|
|
|
|
|
|
|
After: |
|
|
|
Restore |
|
|
|
|
|
|
@@ -123,6 +125,8 @@ After: |
|
|
|
unlet! g:ale_testft2_testlinter2_bar |
|
|
|
delfunction CheckInfo |
|
|
|
|
|
|
|
call ale#test#RestoreDirectory() |
|
|
|
|
|
|
|
Given nolintersft (Empty buffer with no linters): |
|
|
|
Execute (ALEInfo with no linters should return the right output): |
|
|
|
call CheckInfo([ |
|
|
@@ -251,6 +255,33 @@ Execute (ALEInfo should return appropriately named global variables): |
|
|
|
\ 'let g:ale_testft_testlinter1_foo = ''abc''', |
|
|
|
\] + g:globals_lines + g:command_header) |
|
|
|
|
|
|
|
Execute (ALEInfoToFile should write to a file correctly): |
|
|
|
if filereadable(g:dir . '/ale-info-test-file') |
|
|
|
call delete(g:dir . '/ale-info-test-file') |
|
|
|
endif |
|
|
|
|
|
|
|
let g:ale_testft_testlinter1_foo = 'abc' |
|
|
|
let g:ale_testft_testlinter1_bar = ['abc'] |
|
|
|
let g:ale_testft2_testlinter2_foo = 123 |
|
|
|
let g:ale_testft2_testlinter2_bar = {'x': 'y'} |
|
|
|
|
|
|
|
call ale#linter#Define('testft', g:testlinter1) |
|
|
|
call ale#linter#Define('testft2', g:testlinter2) |
|
|
|
|
|
|
|
execute 'ALEInfoToFile ' . fnameescape(g:dir . '/ale-info-test-file') |
|
|
|
|
|
|
|
AssertEqual [ |
|
|
|
\ ' Current Filetype: testft.testft2', |
|
|
|
\ 'Available Linters: [''testlinter1'', ''testlinter2'']', |
|
|
|
\ ' Enabled Linters: [''testlinter1'', ''testlinter2'']', |
|
|
|
\ ' Linter Variables:', |
|
|
|
\ '', |
|
|
|
\ 'let g:ale_testft2_testlinter2_bar = {''x'': ''y''}', |
|
|
|
\ 'let g:ale_testft2_testlinter2_foo = 123', |
|
|
|
\ 'let g:ale_testft_testlinter1_bar = [''abc'']', |
|
|
|
\ 'let g:ale_testft_testlinter1_foo = ''abc''', |
|
|
|
\] + g:globals_lines + g:command_header, readfile(g:dir . '/ale-info-test-file') |
|
|
|
|
|
|
|
Given testft.testft2 (Empty buffer with two filetypes): |
|
|
|
Execute (ALEInfo should buffer-local linter variables): |
|
|
|
let g:ale_testft2_testlinter2_foo = 123 |
|
|
|