summaryrefslogtreecommitdiff
path: root/test/code_action
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-11 17:16:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-11 17:16:57 +0800
commit4f98d5565b416f71d605cafcb22bd76cf697fd03 (patch)
treec31b78ccaab38f78f9ee6eb08970007d22211cbb /test/code_action
parent599065480e33e21e66d307b06e8f8deae101756e (diff)
downloadlua-language-server-4f98d5565b416f71d605cafcb22bd76cf697fd03.zip
fix #1035
Diffstat (limited to 'test/code_action')
-rw-r--r--test/code_action/init.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/code_action/init.lua b/test/code_action/init.lua
index 01423850..67528d59 100644
--- a/test/code_action/init.lua
+++ b/test/code_action/init.lua
@@ -113,6 +113,36 @@ return function(<?a?>, b, c) end
},
}
+TEST [[
+f = function (<?a?>, b) end
+]]
+{
+ {
+ title = lang.script('ACTION_SWAP_PARAMS', {
+ node = 'f',
+ index = 2,
+ }),
+ kind = 'refactor.rewrite',
+ edit = EXISTS,
+ },
+}
+
+TEST [[
+local t = {
+ f = function (<?a?>, b) end
+}
+]]
+{
+ {
+ title = lang.script('ACTION_SWAP_PARAMS', {
+ node = 'f',
+ index = 2,
+ }),
+ kind = 'refactor.rewrite',
+ edit = EXISTS,
+ },
+}
+
--TEST [[
--<?print(1)
--print(2)?>