diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2017-06-26 14:49:15 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2018-10-15 20:13:11 +0200 |
commit | c8810a51a3a7ef1185b45c07d93f7e6769c5ab55 (patch) | |
tree | 55e62aa6c09a729c9c34bd5d4d4d40321f982376 /test/functional/ui/inccommand_spec.lua | |
parent | 8fd092f3ff15bf70f84ec0d716c5aaa2c7379fa1 (diff) | |
download | rneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.tar.gz rneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.tar.bz2 rneovim-c8810a51a3a7ef1185b45c07d93f7e6769c5ab55.zip |
tests: improve robustness of immediate successes in screen tests
Diffstat (limited to 'test/functional/ui/inccommand_spec.lua')
-rw-r--r-- | test/functional/ui/inccommand_spec.lua | 46 |
1 files changed, 41 insertions, 5 deletions
diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index 6a17448582..0983f6f399 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -495,6 +495,18 @@ describe(":substitute, 'inccommand' preserves undo", function() for _, case in pairs(cases) do clear() common_setup(screen, case, default_text) + screen:expect([[ + Inc substitution on | + two lines | + ^ | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + | + ]]) feed_command("set undolevels=1") feed("1G0") @@ -757,8 +769,23 @@ describe(":substitute, inccommand=split", function() -- non-modifier prefix feed(':silent tabedit %s/tw/to') - screen:expect{any=[[two lines]]} - feed('<Esc>') + screen:expect([[ + Inc substitution on | + two lines | + Inc substitution on | + two lines | + | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :silent tabedit %s/tw/to^ | + ]]) end) it('shows split window when typing the pattern', function() @@ -866,7 +893,6 @@ describe(":substitute, inccommand=split", function() it('does not show split window for :s/', function() feed("2gg") feed(":s/tw") - screen:sleep(1) screen:expect([[ Inc substitution on | {12:tw}o lines | @@ -1234,8 +1260,18 @@ describe("inccommand=nosplit", function() -- non-modifier prefix feed(':silent tabedit %s/tw/to') - screen:expect{any=[[two lines]]} - feed('<Esc>') + screen:expect([[ + two lines | + Inc substitution on | + two lines | + | + {15:~ }| + {15:~ }| + {15:~ }| + {15:~ }| + :silent tabedit %s/t| + w/to^ | + ]]) end) it("does not show window after toggling :set inccommand", function() |