From bf1ac8e822835ac2b0e1173e1e014c773b8e51a6 Mon Sep 17 00:00:00 2001 From: Matteo Centenaro Date: Wed, 10 Oct 2018 18:19:47 +0200 Subject: FIX: use mix from the project root directory (#1954) * FIX: use mix from the project root directory * Move find root project function to autoloaded handlers * add tests for #ale#handlers#elixr#FindMixProjectRoot --- test/command_callback/test_elixir_mix_command_callbacks.vader | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/command_callback/test_elixir_mix_command_callbacks.vader') diff --git a/test/command_callback/test_elixir_mix_command_callbacks.vader b/test/command_callback/test_elixir_mix_command_callbacks.vader index 18fb13ed..9315a850 100644 --- a/test/command_callback/test_elixir_mix_command_callbacks.vader +++ b/test/command_callback/test_elixir_mix_command_callbacks.vader @@ -17,3 +17,10 @@ Execute(The default mix command should be correct): \ ale#path#CdString(ale#path#Simplify(g:dir . '/mix_paths/wrapped_project')) \ . g:env_prefix \ . 'mix compile %s' + +Execute(The FindMixProjectRoot should detect the project root directory via mix.exs): + silent execute 'file ' . fnameescape(g:dir . '/elixir_paths/mix_project/lib/app.ex') + + AssertEqual + \ ale#path#Simplify(g:dir . '/elixir_paths/mix_project'), + \ ale#handlers#elixir#FindMixProjectRoot(bufnr('')) -- cgit v1.2.3