diff options
author | KillTheMule <KillTheMule@users.noreply.github.com> | 2016-11-06 16:20:03 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-11-08 21:22:24 +0100 |
commit | 527ba2b12ae71b3010df00f38bfb48a91a35a7d5 (patch) | |
tree | 186645a0d85f93a4ee367e00b1e56181ba303d45 /test/functional/ui/inccommand_spec.lua | |
parent | 6a3f8d48d0c96330511565aef5e10ad965e986b4 (diff) | |
download | rneovim-527ba2b12ae71b3010df00f38bfb48a91a35a7d5.tar.gz rneovim-527ba2b12ae71b3010df00f38bfb48a91a35a7d5.tar.bz2 rneovim-527ba2b12ae71b3010df00f38bfb48a91a35a7d5.zip |
'inccommand': test: scripts/feedkeys() should not trigger preview
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 25ddfdf2a1..03266ad163 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -52,6 +52,31 @@ local function common_setup(screen, inccommand, text) 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() if helpers.pending_win32(pending) then return end |