summaryrefslogtreecommitdiff
path: root/test/test_line_join.vader
diff options
context:
space:
mode:
authorEinfachToll <istjanichtzufassen@googlemail.com>2017-01-19 21:01:51 +0100
committerw0rp <w0rp@users.noreply.github.com>2017-01-19 20:01:51 +0000
commit831f783493ec761191da48a07536b267cbe565ec (patch)
tree78bdbfa59fa907e6a85aa06dd85d0973f7b26a6f /test/test_line_join.vader
parent2478d7d92552c3381b757ec432aa0c92d945af4d (diff)
downloadale-831f783493ec761191da48a07536b267cbe565ec.zip
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.
Diffstat (limited to 'test/test_line_join.vader')
-rw-r--r--test/test_line_join.vader23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_line_join.vader b/test/test_line_join.vader
new file mode 100644
index 00000000..26abb7c9
--- /dev/null
+++ b/test/test_line_join.vader
@@ -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