From e9e1bec772dfc7d26a5d8bf7d3ad2d50e6fed3d5 Mon Sep 17 00:00:00 2001 From: Dmitri Vereshchagin Date: Sat, 19 Aug 2017 17:10:03 +0300 Subject: Update SyntaxErl linter tests --- .../test_erlang_syntaxerl_command_callback.vader | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 test/command_callback/test_erlang_syntaxerl_command_callback.vader (limited to 'test/command_callback/test_erlang_syntaxerl_command_callback.vader') diff --git a/test/command_callback/test_erlang_syntaxerl_command_callback.vader b/test/command_callback/test_erlang_syntaxerl_command_callback.vader new file mode 100644 index 00000000..821444ad --- /dev/null +++ b/test/command_callback/test_erlang_syntaxerl_command_callback.vader @@ -0,0 +1,26 @@ +Before: + Save g:ale_erlang_syntaxerl_executable + unlet! g:ale_erlang_syntaxerl_executable b:ale_erlang_syntaxerl_executable + runtime ale_linters/erlang/syntaxerl.vim + +After: + call ale#linter#Reset() + Restore g:ale_erlang_syntaxerl_executable + +Execute (Get SyntaxErl executable): + AssertEqual 'syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) + + let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl' + AssertEqual '/some/other/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) + + let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl' + AssertEqual '/yet/another/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) + +Execute (Get SyntaxErl command line): + AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + + let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl' + AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + + let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl' + AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) -- cgit v1.2.3 From 18cb9a725d49c674b029110be274ae9606f2270d Mon Sep 17 00:00:00 2001 From: Dmitri Vereshchagin Date: Sat, 19 Aug 2017 14:08:54 +0300 Subject: Add original filename to SyntaxErl command --- test/command_callback/test_erlang_syntaxerl_command_callback.vader | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/command_callback/test_erlang_syntaxerl_command_callback.vader') diff --git a/test/command_callback/test_erlang_syntaxerl_command_callback.vader b/test/command_callback/test_erlang_syntaxerl_command_callback.vader index 821444ad..800aaf3f 100644 --- a/test/command_callback/test_erlang_syntaxerl_command_callback.vader +++ b/test/command_callback/test_erlang_syntaxerl_command_callback.vader @@ -17,10 +17,10 @@ Execute (Get SyntaxErl executable): AssertEqual '/yet/another/syntaxerl', ale_linters#erlang#syntaxerl#GetExecutable(bufnr('')) Execute (Get SyntaxErl command line): - AssertEqual 'syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + AssertEqual 'syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) let g:ale_erlang_syntaxerl_executable = '/some/other/syntaxerl' - AssertEqual '/some/other/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + AssertEqual '/some/other/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) let b:ale_erlang_syntaxerl_executable = '/yet/another/syntaxerl' - AssertEqual '/yet/another/syntaxerl %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) + AssertEqual '/yet/another/syntaxerl -b %s %t', ale_linters#erlang#syntaxerl#GetCommand(bufnr('')) -- cgit v1.2.3