summaryrefslogtreecommitdiff
path: root/test/fixers/test_trim_whitespace.vader
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers/test_trim_whitespace.vader')
-rw-r--r--test/fixers/test_trim_whitespace.vader28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/fixers/test_trim_whitespace.vader b/test/fixers/test_trim_whitespace.vader
new file mode 100644
index 00000000..2ffbcb04
--- /dev/null
+++ b/test/fixers/test_trim_whitespace.vader
@@ -0,0 +1,28 @@
+Before:
+ call ale#test#SetDirectory('/testplugin/test/fixers')
+
+After:
+ call ale#test#RestoreDirectory()
+
+Execute(Should delete all whitespace at the end of different lines):
+ AssertEqual
+ \ [
+ \ 'def foo():',
+ \ ' some_variable = this_is_a_longer_function(',
+ \ 'first_argument,',
+ \ ' second_argument,',
+ \ ' third_with_function_call(',
+ \ 'foo,',
+ \ ' bar,',
+ \ '))',
+ \ ],
+ \ ale#fixers#generic#TrimWhitespace(bufnr(''), [
+ \ 'def foo():',
+ \ ' some_variable = this_is_a_longer_function(',
+ \ 'first_argument,',
+ \ ' second_argument,',
+ \ ' third_with_function_call(',
+ \ 'foo,',
+ \ ' bar,',
+ \ '))',
+ \ ])