diff options
author | Carlos Ramos <carakan@gmail.com> | 2017-10-12 04:27:24 -0400 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2017-10-12 09:27:24 +0100 |
commit | 844354cfed8179181cf69ff8a38937ec4245abbb (patch) | |
tree | 6539ef7a79b5b8df7783f5fd178e847dc445efaa /test/fixers | |
parent | 02c8793c533dccf4b2f13d998135c9b8d7a944fd (diff) | |
download | ale-844354cfed8179181cf69ff8a38937ec4245abbb.zip |
Add new fixer: TrimWhitespace (#991)
add a new fixer: trim_whitespace
Diffstat (limited to 'test/fixers')
-rw-r--r-- | test/fixers/test_trim_whitespace.vader | 28 |
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,', + \ '))', + \ ]) |