From b6d1c419255d335a1e87a5eb32fd910081fa16ac Mon Sep 17 00:00:00 2001 From: Jelte Fennema Date: Sun, 7 Jan 2018 13:11:01 +0100 Subject: Go: Add gotype support (#1099) --- .../test_gotype_command_callback.vader | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/command_callback/test_gotype_command_callback.vader (limited to 'test/command_callback') diff --git a/test/command_callback/test_gotype_command_callback.vader b/test/command_callback/test_gotype_command_callback.vader new file mode 100644 index 00000000..f95e8423 --- /dev/null +++ b/test/command_callback/test_gotype_command_callback.vader @@ -0,0 +1,19 @@ +Before: + runtime ale_linters/go/gotype.vim + call ale#test#SetFilename('../go_files/testfile2.go') + +After: + call ale#linter#Reset() + + +Execute(The gotype callback should include other files from the directory but exclude the file itself): + let dir = expand('#' . bufnr('') . ':p:h') + AssertEqual + \ "gotype %t ". ale#Escape(ale#path#Simplify(dir . "/testfile.go")), + \ ale_linters#go#gotype#GetCommand(bufnr('')) + +Execute(The gotype callback should ignore test files): + call ale#test#SetFilename('bla_test.go') + AssertEqual + \ 0, + \ ale_linters#go#gotype#GetCommand(bufnr('')) -- cgit v1.2.3