Skip to content

Commit

Permalink
test docstring-generation with self-dependent dynamicNode.
Browse files Browse the repository at this point in the history
  • Loading branch information
L3MON4D3 committed Nov 6, 2024
1 parent ae8d95c commit 3d8f8bd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tests/integration/dynamic_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -401,16 +401,21 @@ screen:expect({
end)

it("selected text is selected again after updating (when possible).", function()
exec_lua[[
ls.snip_expand(s("trig", {

assert.are.same({"${1:${1:esdf}}$0"}, exec_lua[[
snip = s("trig", {
d(1, function(args)
if not args[1] then
return sn(nil, {i(1, "asdf", {key = "ins"})})
else
return sn(nil, {i(1, args[1]:gsub("a", "e"), {key = "ins"})})
end
end, {opt(k("ins"))}, {snippetstring_args = true})
}))
})
return snip:get_docstring()
]])
exec_lua[[
ls.snip_expand(snip)
]]
feed("<Esc>a")
exec_lua("ls.lsp_expand('${1:asdf}')")
Expand Down

0 comments on commit 3d8f8bd

Please sign in to comment.