Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter
This commit is contained in:
@@ -6,7 +6,7 @@ Before:
|
||||
let g:ale_python_autopep8_executable = 'xxxinvalid'
|
||||
let g:ale_python_autopep8_options = ''
|
||||
|
||||
silent! execute 'cd /testplugin/test/command_callback'
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
@@ -14,11 +14,7 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.py'
|
||||
unlet! g:dir
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The autopep8 callback should return the correct default values):
|
||||
AssertEqual
|
||||
|
||||
@@ -4,7 +4,7 @@ Before:
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_python_isort_executable = 'xxxinvalid'
|
||||
|
||||
silent! execute 'cd /testplugin/test/command_callback'
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
@@ -12,11 +12,7 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.py'
|
||||
unlet! g:dir
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The isort callback should return the correct default values):
|
||||
AssertEqual
|
||||
|
||||
@@ -6,7 +6,7 @@ Before:
|
||||
let g:ale_puppet_puppetlint_executable = 'xxxinvalid'
|
||||
let g:ale_puppet_puppetlint_options = '--invalid'
|
||||
|
||||
silent! execute 'cd /testplugin/test/command_callback'
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
@@ -14,11 +14,7 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.pp'
|
||||
unlet! g:dir
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The puppetlint callback should return the correct default values):
|
||||
silent execute 'file ' . fnameescape(g:dir . '/puppet_paths/dummy.pp')
|
||||
|
||||
@@ -4,7 +4,7 @@ Before:
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_ruby_rubocop_executable = 'xxxinvalid'
|
||||
|
||||
silent! execute 'cd /testplugin/test/command_callback'
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
@@ -12,11 +12,7 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.rb'
|
||||
unlet! g:dir
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The rubocop callback should return the correct default values):
|
||||
call ale#test#SetFilename('ruby_paths/dummy.rb')
|
||||
|
||||
@@ -4,7 +4,7 @@ Before:
|
||||
" Use an invalid global executable, so we don't match it.
|
||||
let g:ale_python_yapf_executable = 'xxxinvalid'
|
||||
|
||||
silent! execute 'cd /testplugin/test/command_callback'
|
||||
call ale#test#SetDirectory('/testplugin/test/fixers')
|
||||
silent cd ..
|
||||
silent cd command_callback
|
||||
let g:dir = getcwd()
|
||||
@@ -12,11 +12,7 @@ Before:
|
||||
After:
|
||||
Restore
|
||||
|
||||
silent execute 'cd ' . fnameescape(g:dir)
|
||||
" Set the file to something else,
|
||||
" or we'll cause issues when running other tests
|
||||
silent file 'dummy.py'
|
||||
unlet! g:dir
|
||||
call ale#test#RestoreDirectory()
|
||||
|
||||
Execute(The yapf callback should return the correct default values):
|
||||
AssertEqual
|
||||
|
||||
Reference in New Issue
Block a user