]> git.madduck.net Git - etc/vim.git/blob - test/linter/test_luacheck.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / test / linter / test_luacheck.vader
1 Before:
2   call ale#assert#SetUpLinterTest('lua', 'luacheck')
3   " Default to testing linting Lua not in Vim directories.
4   call ale#test#SetFilename('/test.lua')
5
6 After:
7   " Clear the variable for saving the result of the runtime check.
8   " We don't want to cache the result between tests.
9   unlet! b:ale_in_runtimepath
10   call ale#assert#TearDownLinterTest()
11
12 Execute(The luacheck default command should be correct):
13   AssertLinter 'luacheck',
14   \ ale#Escape('luacheck') . ' --formatter plain --codes --filename %s -'
15
16 Execute(You should be able to set luacheck options):
17   let g:ale_lua_luacheck_options = '--config filename'
18
19   AssertLinter 'luacheck',
20   \ ale#Escape('luacheck')
21   \   . ' --config filename'
22   \   . ' --formatter plain --codes --filename %s -'
23
24 Execute(The luacheck executable should be configurable):
25   let g:ale_lua_luacheck_executable = 'luacheck.sh'
26
27   AssertLinter 'luacheck.sh',
28   \ ale#Escape('luacheck.sh') . ' --formatter plain --codes --filename %s -'
29
30 Execute(The luacheck command should include vim as a global if in runtimepath):
31   call ale#test#SetFilename('test.lua')
32   AssertLinter 'luacheck',
33   \ ale#Escape('luacheck') . ' --globals vim --formatter plain --codes --filename %s -'
34
35 Execute(The default Vim globals should not be set if globals are already set):
36   call ale#test#SetFilename('test.lua')
37   let g:ale_lua_luacheck_options = '--globals foo'
38   AssertLinter 'luacheck',
39   \ ale#Escape('luacheck') . ' --globals foo --formatter plain --codes --filename %s -'