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_cargo_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_cargo_command_callbacks.vader')
-rw-r--r-- | test/command_callback/test_cargo_command_callbacks.vader | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/command_callback/test_cargo_command_callbacks.vader b/test/command_callback/test_cargo_command_callbacks.vader index 2d83351e..ee942c28 100644 --- a/test/command_callback/test_cargo_command_callbacks.vader +++ b/test/command_callback/test_cargo_command_callbacks.vader @@ -118,20 +118,23 @@ Execute(--all-features should be used when g:ale_rust_cargo_default_feature_beha GivenCommandOutput ['cargo 0.22.0 (3423351a5 2017-10-06)'] AssertLinter 'cargo', [ale#Escape('cargo') . ' --version', 'cargo check --frozen --message-format=json -q --all-features'] -Execute(When a crate belongs to a workspace we should cd into the crate): +Execute(Cargo should run from the crate directory when set to avoid the workspace): let g:ale_rust_cargo_avoid_whole_workspace = 1 call ale#test#SetFilename('cargo_workspace_paths/subpath/test.rs') + AssertLinterCwd ale#path#Simplify(g:dir . '/cargo_workspace_paths/subpath') + call ale#semver#ResetVersionCache() AssertLinter 'cargo', [ \ ale#Escape('cargo') . ' --version', - \ 'cd ' . ale#Escape(ale#path#Simplify(g:dir . '/cargo_workspace_paths/subpath')) . ' && ' - \ . 'cargo check --frozen --message-format=json -q', + \ 'cargo check --frozen --message-format=json -q', \] -Execute(When a crate belongs to a workspace we chdir into the crate, unless we disabled it): +Execute(Cargo should not run from the crate directory when not set to avoid the workspace): let g:ale_rust_cargo_avoid_whole_workspace = 0 call ale#test#SetFilename('cargo_workspace_paths/subpath/test.rs') + AssertLinterCwd '' + call ale#semver#ResetVersionCache() AssertLinter 'cargo', [ \ ale#Escape('cargo') . ' --version', \ 'cargo check --frozen --message-format=json -q', |