summaryrefslogtreecommitdiff
path: root/test/command_callback/test_luac_command_callback.vader
diff options
context:
space:
mode:
authorjiangzhi.xie <xiejiangzhi@gmail.com>2018-01-08 23:19:17 +0800
committerjiangzhi.xie <xiejiangzhi@gmail.com>2018-01-08 23:32:02 +0800
commit112fcf7dd57a077f70ae39bb03d192f5c832aa2e (patch)
tree7f869ba3afaec822893b7e0a2856877a05153158 /test/command_callback/test_luac_command_callback.vader
parentf1747901cc00abb7becb64c02bfccad46b66ed21 (diff)
downloadale-112fcf7dd57a077f70ae39bb03d192f5c832aa2e.zip
Add a luac linter for Lua
Diffstat (limited to 'test/command_callback/test_luac_command_callback.vader')
-rw-r--r--test/command_callback/test_luac_command_callback.vader16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/command_callback/test_luac_command_callback.vader b/test/command_callback/test_luac_command_callback.vader
new file mode 100644
index 00000000..f9eb4d3f
--- /dev/null
+++ b/test/command_callback/test_luac_command_callback.vader
@@ -0,0 +1,16 @@
+Before:
+ runtime ale_linters/lua/luac.vim
+
+After:
+ call ale#linter#Reset()
+
+Execute(The default command should be correct):
+ AssertEqual ale#Escape('luac') . ' -p -',
+ \ join(split(ale_linters#lua#luac#GetCommand(1)))
+
+Execute(The luac executable should be configurable):
+ let g:ale_lua_luac_executable = 'luac.sh'
+
+ AssertEqual 'luac.sh', ale_linters#lua#luac#GetExecutable(1)
+ AssertEqual ale#Escape('luac.sh') . ' -p -',
+ \ join(split(ale_linters#lua#luac#GetCommand(1)))