summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGonzalo Quero <gquero@drwuk.com>2020-09-02 14:31:11 +0100
committerGonzalo Quero <gquero@drwuk.com>2020-11-23 10:08:00 +0000
commit491ceacb64f7be6c4e36fd6586af22adfd6a309e (patch)
tree02b2148763aae82ef0742d3cdbebf25bf4214522 /test
parent05d5cc49881bfef6cfcdf1f6bcf5771d9a8a4b93 (diff)
downloadale-491ceacb64f7be6c4e36fd6586af22adfd6a309e.zip
fix: Use proper CdPath function in test
Diffstat (limited to 'test')
-rw-r--r--test/test_elixir_credo.vader8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_elixir_credo.vader b/test/test_elixir_credo.vader
index db956683..78d3e0a6 100644
--- a/test/test_elixir_credo.vader
+++ b/test/test_elixir_credo.vader
@@ -2,19 +2,21 @@ Before:
call ale#test#SetDirectory('/testplugin/test')
runtime ale_linters/elixir/credo.vim
+ let g:test_command_start = ale#path#CdString('.') . 'mix help credo && '
After:
call ale#test#RestoreDirectory()
call ale#linter#Reset()
let g:ale_elixir_credo_strict = 0
let g:ale_elixir_credo_config_file = ''
+ let g:test_command_start = ''
Execute(credo runs the right command):
call ale#test#SetFilename('elixir-test-files/testfile.ex')
AssertEqual
\ ale_linters#elixir#credo#GetCommand(bufnr('')),
- \ 'cd ''.'' && mix help credo && mix credo suggest --format=flycheck --read-from-stdin %s'
+ \ g:test_command_start . 'mix credo suggest --format=flycheck --read-from-stdin %s'
Execute(credo runs the right command with the strict flag):
let g:ale_elixir_credo_strict = 1
@@ -22,7 +24,7 @@ Execute(credo runs the right command with the strict flag):
AssertEqual
\ ale_linters#elixir#credo#GetCommand(bufnr('')),
- \ 'cd ''.'' && mix help credo && mix credo --strict --format=flycheck --read-from-stdin %s'
+ \ g:test_command_start . 'mix credo --strict --format=flycheck --read-from-stdin %s'
Execute(credo runs the right command with a custom config file):
let g:ale_elixir_credo_config_file = '/home/user/custom_credo.exs'
@@ -30,4 +32,4 @@ Execute(credo runs the right command with a custom config file):
AssertEqual
\ ale_linters#elixir#credo#GetCommand(bufnr('')),
- \ 'cd ''.'' && mix help credo && mix credo suggest --config-file /home/user/custom_credo.exs --format=flycheck --read-from-stdin %s'
+ \ g:test_command_start . 'mix credo suggest --config-file /home/user/custom_credo.exs --format=flycheck --read-from-stdin %s'