From 9fe7b1fe6a23fb55e6d782293585d58193123f59 Mon Sep 17 00:00:00 2001 From: w0rp Date: Mon, 1 Mar 2021 20:11:10 +0000 Subject: Close #2281 - Separate cwd commands from commands Working directories are now set seperately from the commands so they can later be swapped out when running linters over projects is supported, and also better support filename mapping for running linters on other machines in future. --- test/fixers/test_autoimport_fixer_callback.vader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/fixers/test_autoimport_fixer_callback.vader') diff --git a/test/fixers/test_autoimport_fixer_callback.vader b/test/fixers/test_autoimport_fixer_callback.vader index 6952cbb8..bea448b5 100644 --- a/test/fixers/test_autoimport_fixer_callback.vader +++ b/test/fixers/test_autoimport_fixer_callback.vader @@ -28,8 +28,8 @@ Execute(The autoimport callback should return the correct default values): silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py') AssertEqual \ { - \ 'command': ale#path#BufferCdString(bufnr('')) - \ . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport')) . ' -', + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport')) . ' -', \ }, \ ale#fixers#autoimport#Fix(bufnr('')) @@ -43,8 +43,8 @@ Execute(The autoimport callback should respect custom options): silent execute 'file ' . fnameescape(g:dir . '/python_paths/with_virtualenv/subdir/foo/bar.py') AssertEqual \ { - \ 'command': ale#path#BufferCdString(bufnr('')) - \ . ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport')) + \ 'cwd': '%s:h', + \ 'command': ale#Escape(ale#path#Simplify(g:dir . '/python_paths/with_virtualenv/env/' . b:bin_dir . '/autoimport')) \ . ' --multi-line=3 --trailing-comma -', \ }, \ ale#fixers#autoimport#Fix(bufnr('')) -- cgit v1.2.3