From a42999a639b2916b769a85f37d037be314d9d61b Mon Sep 17 00:00:00 2001 From: w0rp Date: Sun, 15 Jul 2018 18:24:53 +0100 Subject: Massively reduce the amount of code needed for linter tests --- test/command_callback/test_gotype_command_callback.vader | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/command_callback/test_gotype_command_callback.vader') diff --git a/test/command_callback/test_gotype_command_callback.vader b/test/command_callback/test_gotype_command_callback.vader index 4fba3344..da9ceaf3 100644 --- a/test/command_callback/test_gotype_command_callback.vader +++ b/test/command_callback/test_gotype_command_callback.vader @@ -1,15 +1,15 @@ Before: - runtime ale_linters/go/gotype.vim + call ale#assert#SetUpLinterTest('go', 'gotype') call ale#test#SetFilename('../go_files/testfile2.go') After: - call ale#linter#Reset() + call ale#assert#TearDownLinterTest() Execute(The default gotype command should be correct): - AssertEqual 'cd ' . ale#Escape(expand('%:p:h')) . ' && ' - \ . ' gotype .', - \ ale_linters#go#gotype#GetCommand(bufnr('')) + AssertLinter 'gotype', + \ 'cd ' . ale#Escape(expand('%:p:h')) . ' && gotype .' Execute(The gotype callback should ignore test files): call ale#test#SetFilename('bla_test.go') - AssertEqual 0, ale_linters#go#gotype#GetCommand(bufnr('')) + + AssertLinter 'gotype', '' -- cgit v1.2.3