summaryrefslogtreecommitdiff
path: root/test/fixers/test_trim_whitespace.vader
blob: 2ffbcb048d694139521e67a2317e5fe2a03a58df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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,',   
  \   '))',              
  \ ])