diff options
author | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2021-03-01 20:11:10 +0000 |
commit | 9fe7b1fe6a23fb55e6d782293585d58193123f59 (patch) | |
tree | 0403deb70011aee7be08e586b10b5828cf69499e /test/command_callback/test_cs_mcsc_command_callbacks.vader | |
parent | 48fab99a0ab793e1b9607795c21659f12bd6947f (diff) | |
download | ale-9fe7b1fe6a23fb55e6d782293585d58193123f59.zip |
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.
Diffstat (limited to 'test/command_callback/test_cs_mcsc_command_callbacks.vader')
-rw-r--r-- | test/command_callback/test_cs_mcsc_command_callbacks.vader | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/test/command_callback/test_cs_mcsc_command_callbacks.vader b/test/command_callback/test_cs_mcsc_command_callbacks.vader index d15898e0..e784cf15 100644 --- a/test/command_callback/test_cs_mcsc_command_callbacks.vader +++ b/test/command_callback/test_cs_mcsc_command_callbacks.vader @@ -5,43 +5,38 @@ After: call ale#assert#TearDownLinterTest() Execute(The mcsc linter should return the correct default command): - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + AssertLinterCwd expand('%:p:h') + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') Execute(The options should be be used in the command): let g:ale_cs_mcsc_options = '-pkg:dotnet' - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + AssertLinter 'mcs', 'mcs -unsafe -pkg:dotnet -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') Execute(The souce path should be be used in the command): let g:ale_cs_mcsc_source = '../foo/bar' - AssertLinter 'mcs', ale#path#CdString('../foo/bar') - \ . 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + AssertLinterCwd '../foo/bar' + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') Execute(The list of search pathes for assemblies should be be used in the command if not empty): let g:ale_cs_mcsc_assembly_path = ['/usr/lib/mono', '../foo/bar'] - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe' + AssertLinter 'mcs', 'mcs -unsafe' \ . ' -lib:' . ale#Escape('/usr/lib/mono') . ',' . ale#Escape('../foo/bar') \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') let g:ale_cs_mcsc_assembly_path = [] - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') Execute(The list of assemblies should be be used in the command if not empty): let g:ale_cs_mcsc_assemblies = ['foo.dll', 'bar.dll'] - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe' + AssertLinter 'mcs', 'mcs -unsafe' \ . ' -r:' . ale#Escape('foo.dll') . ',' . ale#Escape('bar.dll') \ . ' -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') let g:ale_cs_mcsc_assemblies = [] - AssertLinter 'mcs', ale#path#CdString(g:dir) - \ . 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') + AssertLinter 'mcs', 'mcs -unsafe -out:TEMP -t:module -recurse:' . ale#Escape('*.cs') |