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/legacy/search_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/legacy/search_spec.lua')
-rw-r--r-- | test/functional/legacy/search_spec.lua | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index 277d8d6c7f..3ed06a22e7 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -92,6 +92,7 @@ describe('search cmdline', function() 9 {inc:the}se | /the^ | ]]) + screen.bell = false feed('<C-G>') if wrapscan == 'wrapscan' then screen:expect([[ @@ -100,11 +101,13 @@ describe('search cmdline', function() /the^ | ]]) else - screen:expect([[ + screen:expect{grid=[[ 8 them | 9 {inc:the}se | /the^ | - ]]) + ]], condition=function() + eq(true, screen.bell) + end} feed('<CR>') eq({0, 0, 0, 0}, funcs.getpos('"')) end @@ -120,6 +123,7 @@ describe('search cmdline', function() 10 foobar | ?the^ | ]]) + screen.bell = false if wrapscan == 'wrapscan' then feed('<C-G>') screen:expect([[ @@ -135,11 +139,13 @@ describe('search cmdline', function() ]]) else feed('<C-G>') - screen:expect([[ + screen:expect{grid=[[ 9 {inc:the}se | 10 foobar | ?the^ | - ]]) + ]], condition=function() + eq(true, screen.bell) + end} feed('<CR>') screen:expect([[ 9 ^these | @@ -173,6 +179,7 @@ describe('search cmdline', function() 3 the | ?the^ | ]]) + screen.bell = false feed('<C-T>') if wrapscan == 'wrapscan' then screen:expect([[ @@ -181,11 +188,13 @@ describe('search cmdline', function() ?the^ | ]]) else - screen:expect([[ + screen:expect{grid=[[ 2 {inc:the}se | 3 the | ?the^ | - ]]) + ]], condition=function() + eq(true, screen.bell) + end} end end |