mirror of
https://github.com/dense-analysis/ale.git
synced 2026-01-20 01:52:58 +08:00
Join the lines Neovim passes to ale (#263)
* Join the lines Neovim passes to ale Fixes #256 * Refactor line joining into own function * Add test for line joining * Fix the test. Sorry.
This commit is contained in:
23
test/test_line_join.vader
Normal file
23
test/test_line_join.vader
Normal file
@@ -0,0 +1,23 @@
|
||||
Before:
|
||||
let g:test_output = [
|
||||
\ ['one', 'two', 'thr'],
|
||||
\ ['ee', ''],
|
||||
\ ['fou'],
|
||||
\ [''],
|
||||
\ ['r', 'five'],
|
||||
\ [],
|
||||
\ ['', 'six']
|
||||
\]
|
||||
|
||||
let g:expected_result = ['one', 'two', 'three', 'four', 'five', 'six']
|
||||
|
||||
After:
|
||||
unlet g:test_output
|
||||
unlet g:expected_result
|
||||
|
||||
Execute (Join the lines):
|
||||
let joined_result = []
|
||||
for item in g:test_output
|
||||
call ale#engine#JoinNeovimOutput(joined_result, item)
|
||||
endfor
|
||||
AssertEqual g:expected_result, joined_result
|
||||
Reference in New Issue
Block a user