diff options
| author | Hugo Musso Gualandi <hugo_musso_gualandi@hotmail.com> | 2021-09-26 11:19:58 -0300 |
|---|---|---|
| committer | Hugo Musso Gualandi <hugo_musso_gualandi@hotmail.com> | 2021-09-26 11:19:58 -0300 |
| commit | c26fb65ed17ef44854030f2c0afffea357012dce (patch) | |
| tree | 5c741de4176258090484e05c90cf814b45b20d06 /test/indent | |
| parent | aa1a2803093348e4d18244af7c9785c32041abbe (diff) | |
lua.kak: Add some test cases, and also fix a bug
Diffstat (limited to 'test/indent')
| -rw-r--r-- | test/indent/lua/insert-end-only-when-needed/in | 14 | ||||
| -rw-r--r-- | test/indent/lua/insert-end-only-when-needed/out | 18 |
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() |
