diff options
author | Jelte Fennema <github-tech@jeltef.nl> | 2018-01-07 13:11:01 +0100 |
---|---|---|
committer | w0rp <w0rp@users.noreply.github.com> | 2018-01-07 12:11:01 +0000 |
commit | b6d1c419255d335a1e87a5eb32fd910081fa16ac (patch) | |
tree | d052512bc99cd95432cdc08dec5fac4e7e29842a /test/command_callback/test_gotype_command_callback.vader | |
parent | c9d66b861b4593e1797cedd302a2203bd7110a99 (diff) | |
download | ale-b6d1c419255d335a1e87a5eb32fd910081fa16ac.zip |
Go: Add gotype support (#1099)
Diffstat (limited to 'test/command_callback/test_gotype_command_callback.vader')
-rw-r--r-- | test/command_callback/test_gotype_command_callback.vader | 19 |
1 files changed, 19 insertions, 0 deletions
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('')) |