mirror of
https://github.com/neovim/neovim.git
synced 2025-12-17 20:05:38 +00:00
'inccommand': test: scripts/feedkeys() should not trigger preview
This commit is contained in:
committed by
Justin M. Keyes
parent
6a3f8d48d0
commit
527ba2b12a
@@ -52,6 +52,31 @@ local function common_setup(screen, inccommand, text)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe(":substitute, inccommand=split does not trigger preview", function()
|
||||||
|
before_each(function()
|
||||||
|
clear()
|
||||||
|
common_setup(nil, "split", default_text)
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("when invoked by feedkeys() in a script ", function()
|
||||||
|
source(':call feedkeys(":%s/tw/MO/g\\<CR>")')
|
||||||
|
wait()
|
||||||
|
eq(1, eval("bufnr('$')"))
|
||||||
|
|
||||||
|
-- sanity check: assert the buffer state
|
||||||
|
expect(default_text:gsub("tw", "MO"))
|
||||||
|
end)
|
||||||
|
|
||||||
|
it("when invoked directly in a script ", function()
|
||||||
|
source('%s/tw/MO/g')
|
||||||
|
wait()
|
||||||
|
eq(1, eval("bufnr('$')"))
|
||||||
|
|
||||||
|
-- sanity check: assert the buffer state
|
||||||
|
expect(default_text:gsub("tw", "MO"))
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
describe(":substitute, 'inccommand' preserves", function()
|
describe(":substitute, 'inccommand' preserves", function()
|
||||||
if helpers.pending_win32(pending) then return end
|
if helpers.pending_win32(pending) then return end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user