summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-26 11:19:58 -0300
committerHugo Musso Gualandi <hugo_musso_gualandi@hotmail.com>2021-09-26 11:19:58 -0300
commitc26fb65ed17ef44854030f2c0afffea357012dce (patch)
tree5c741de4176258090484e05c90cf814b45b20d06 /test
parentaa1a2803093348e4d18244af7c9785c32041abbe (diff)
lua.kak: Add some test cases, and also fix a bug
Diffstat (limited to 'test')
-rw-r--r--test/indent/lua/insert-end-only-when-needed/in14
-rw-r--r--test/indent/lua/insert-end-only-when-needed/out18
2 files changed, 30 insertions, 2 deletions
diff --git a/test/indent/lua/insert-end-only-when-needed/in b/test/indent/lua/insert-end-only-when-needed/in
index 14415ac6..9c880220 100644
--- a/test/indent/lua/insert-end-only-when-needed/in
+++ b/test/indent/lua/insert-end-only-when-needed/in
@@ -3,7 +3,19 @@ end
function fun2()%( )
-
function fun3()
if true then%( )
end
+
+function fun4()
+ if true then
+ return 10
+ else%( )
+end
+
+function fun5()
+ if true then%( )
+ return 10
+end
+
+local str = "while"%( )
diff --git a/test/indent/lua/insert-end-only-when-needed/out b/test/indent/lua/insert-end-only-when-needed/out
index b1644048..f2b9fa25 100644
--- a/test/indent/lua/insert-end-only-when-needed/out
+++ b/test/indent/lua/insert-end-only-when-needed/out
@@ -6,9 +6,25 @@ function fun2()
foo()
end
-
function fun3()
if true then
foo()
end
end
+
+function fun4()
+ if true then
+ return 10
+ else
+ foo()
+ end
+end
+
+function fun5()
+ if true then
+ foo()
+ return 10
+end
+
+local str = "while"
+foo()