diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-09 22:43:25 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-09 22:43:31 +0100 |
commit | 6a84605c578ea844a02e429edb38ff2986bc308b (patch) | |
tree | a76cd146691fe7c11ae9576162091ab617ed2ba8 /test/fixers | |
parent | b50a7318fbf8836b820df9d10e0fc6ffba6bcd1e (diff) | |
download | ale-6a84605c578ea844a02e429edb38ff2986bc308b.zip |
Make every test set filenames and switch directories in the same way, and fix some missing escaping for the rubocop linter
Diffstat (limited to 'test/fixers')
-rw-r--r-- | test/fixers/test_autopep8_fixer_callback.vader | 8 | ||||
-rw-r--r-- | test/fixers/test_isort_fixer_callback.vader | 8 | ||||
-rw-r--r-- | test/fixers/test_puppetlint_fixer_callback.vader | 8 | ||||
-rw-r--r-- | test/fixers/test_rubocop_fixer_callback.vader | 8 | ||||
-rw-r--r-- | test/fixers/test_yapf_fixer_callback.vader | 8 |
5 files changed, 10 insertions, 30 deletions
diff --git a/test/fixers/test_autopep8_fixer_callback.vader b/test/fixers/test_autopep8_fixer_callback.vader index 3b5b057c..c8c0bd46 100644 --- a/test/fixers/test_autopep8_fixer_callback.vader +++ b/test/fixers/test_autopep8_fixer_callback.vader @@ -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 diff --git a/test/fixers/test_isort_fixer_callback.vader b/test/fixers/test_isort_fixer_callback.vader index 495f23c5..437e2764 100644 --- a/test/fixers/test_isort_fixer_callback.vader +++ b/test/fixers/test_isort_fixer_callback.vader @@ -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 diff --git a/test/fixers/test_puppetlint_fixer_callback.vader b/test/fixers/test_puppetlint_fixer_callback.vader index 398f61dc..04a85e56 100644 --- a/test/fixers/test_puppetlint_fixer_callback.vader +++ b/test/fixers/test_puppetlint_fixer_callback.vader @@ -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') diff --git a/test/fixers/test_rubocop_fixer_callback.vader b/test/fixers/test_rubocop_fixer_callback.vader index 74160c73..e3383537 100644 --- a/test/fixers/test_rubocop_fixer_callback.vader +++ b/test/fixers/test_rubocop_fixer_callback.vader @@ -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') diff --git a/test/fixers/test_yapf_fixer_callback.vader b/test/fixers/test_yapf_fixer_callback.vader index 0b88e4d8..2653fd18 100644 --- a/test/fixers/test_yapf_fixer_callback.vader +++ b/test/fixers/test_yapf_fixer_callback.vader @@ -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 |