summaryrefslogtreecommitdiff
path: root/test/fixers
diff options
context:
space:
mode:
Diffstat (limited to 'test/fixers')
-rw-r--r--test/fixers/test_break_up_long_lines_python_fixer.vader4
-rw-r--r--test/fixers/test_standard_fixer_callback.vader14
-rw-r--r--test/fixers/test_trim_whitespace.vader18
3 files changed, 25 insertions, 11 deletions
diff --git a/test/fixers/test_break_up_long_lines_python_fixer.vader b/test/fixers/test_break_up_long_lines_python_fixer.vader
index 5fd991f0..847d3358 100644
--- a/test/fixers/test_break_up_long_lines_python_fixer.vader
+++ b/test/fixers/test_break_up_long_lines_python_fixer.vader
@@ -16,7 +16,7 @@ Execute(Long lines with basic function calls should be broken up correctly):
\ ' bar,',
\ '))',
\ ],
- \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), [
+ \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), v:null, [
\ 'def foo():',
\ ' some_variable = this_is_a_longer_function(first_argument, second_argument, third_with_function_call(foo, bar))',
\ ])
@@ -33,7 +33,7 @@ Execute(Longer lines should be permitted if a configuration file allows it):
\ ' a_third_long_word,',
\ ')'
\ ],
- \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), [
+ \ ale#fixers#generic_python#BreakUpLongLines(bufnr(''), v:null, [
\ 'x = this_line_is_between_79_and_90_characters(first, second, third, fourth, fifth)',
\ 'y = this_line_is_longer_than_90_characters(much_longer_word, another_longer_word, a_third_long_word)',
\ ])
diff --git a/test/fixers/test_standard_fixer_callback.vader b/test/fixers/test_standard_fixer_callback.vader
index 38f2d54a..db9f20f6 100644
--- a/test/fixers/test_standard_fixer_callback.vader
+++ b/test/fixers/test_standard_fixer_callback.vader
@@ -1,6 +1,9 @@
Before:
call ale#test#SetDirectory('/testplugin/test/fixers')
+ unlet! b:ale_javascript_standard_executable
+ unlet! b:ale_javascript_standard_options
+
After:
call ale#test#RestoreDirectory()
@@ -15,3 +18,14 @@ Execute(The executable path should be correct):
\ . ' --fix %t',
\ },
\ ale#fixers#standard#Fix(bufnr(''))
+
+Execute(Custom options should be supported):
+ let b:ale_javascript_standard_use_global = 1
+ let b:ale_javascript_standard_options = '--foo-bar'
+
+ AssertEqual
+ \ {
+ \ 'read_temporary_file': 1,
+ \ 'command': ale#Escape('standard') . ' --foo-bar --fix %t',
+ \ },
+ \ ale#fixers#standard#Fix(bufnr(''))
diff --git a/test/fixers/test_trim_whitespace.vader b/test/fixers/test_trim_whitespace.vader
index 2ffbcb04..10070374 100644
--- a/test/fixers/test_trim_whitespace.vader
+++ b/test/fixers/test_trim_whitespace.vader
@@ -16,13 +16,13 @@ Execute(Should delete all whitespace at the end of different lines):
\ ' 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,',
- \ '))',
+ \ ale#fixers#generic#TrimWhitespace(bufnr(''), v:null, [
+ \ 'def foo():',
+ \ ' some_variable = this_is_a_longer_function(',
+ \ 'first_argument,',
+ \ ' second_argument,',
+ \ ' third_with_function_call(',
+ \ 'foo,',
+ \ ' bar,',
+ \ '))',
\ ])