patch 8.2.1908: Lua is initialized even when not used
Problem: Lua is initialized even when not used.
Solution: Put lua_init() after check for "eap->skip". (Christian Brabandt,
closes #7191). Avoid compiler warnings.
diff --git a/src/testdir/test_lua.vim b/src/testdir/test_lua.vim
index d21c40d..43b4aa3 100644
--- a/src/testdir/test_lua.vim
+++ b/src/testdir/test_lua.vim
@@ -1,6 +1,14 @@
" Tests for Lua.
source check.vim
+
+" This test also works without the lua feature.
+func Test_skip_lua()
+ if 0
+ lua print("Not executed")
+ endif
+endfunc
+
CheckFeature lua
CheckFeature float