diff options
author | w0rp <devw0rp@gmail.com> | 2017-10-01 20:23:41 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-10-01 20:23:41 +0100 |
commit | 5091e2de452e493678e236c92b2ca5bb7bc29653 (patch) | |
tree | 4fa1e0a06568a6592ce82e0cdc9660d08cc52cdb /test/fixers/test_autopep8_fixer_callback.vader | |
parent | 638ca4208232ab7abe46efa5052403e58dcfc35a (diff) | |
download | ale-5091e2de452e493678e236c92b2ca5bb7bc29653.zip |
Get fixer tests to work on Windows
Diffstat (limited to 'test/fixers/test_autopep8_fixer_callback.vader')
-rw-r--r-- | test/fixers/test_autopep8_fixer_callback.vader | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/fixers/test_autopep8_fixer_callback.vader b/test/fixers/test_autopep8_fixer_callback.vader index c8c0bd46..600fb194 100644 --- a/test/fixers/test_autopep8_fixer_callback.vader +++ b/test/fixers/test_autopep8_fixer_callback.vader @@ -11,9 +11,13 @@ Before: silent cd command_callback let g:dir = getcwd() + let b:bin_dir = has('win32') ? 'Scripts' : 'bin' + After: Restore + unlet! b:bin_dir + call ale#test#RestoreDirectory() Execute(The autopep8 callback should return the correct default values): @@ -23,7 +27,7 @@ Execute(The autopep8 callback should return the correct default values): silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py') AssertEqual - \ {'command': "'" . g:dir . "/python_paths/with_virtualenv/env/bin/autopep8' -" }, + \ {'command': ale#Escape(ale#path#Winify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' -'}, \ ale#fixers#autopep8#Fix(bufnr('')) Execute(The autopep8 callback should include options): @@ -31,5 +35,5 @@ Execute(The autopep8 callback should include options): silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py') AssertEqual - \ {'command': "'" . g:dir . "/python_paths/with_virtualenv/env/bin/autopep8' --some-option -" }, + \ {'command': ale#Escape(ale#path#Winify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autopep8')) . ' --some-option -' }, \ ale#fixers#autopep8#Fix(bufnr('')) |