Skip to content

Commit 523371b

Browse files
authored
vim-patch:9.1.1681: tests: no test for actually moving cursor with 'acl' (neovim#35452)
Problem: tests: no test for actually moving cursor when menu is not open with 'autocompletedelay'. Solution: Use <Up> first in the test. Also remove two unnecessary <Esc>s in completion timeout test (zeertzjq). closes: vim/vim#18097 vim/vim@e8b99ff
1 parent 0b8a9bd commit 523371b

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

test/functional/editor/completion_spec.lua

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1557,8 +1557,24 @@ describe('completion', function()
15571557
{1:~ }|*5
15581558
{5:-- INSERT --} |
15591559
]])
1560+
feed('<Up>')
1561+
screen:expect([[
1562+
foo |
1563+
foobar |
1564+
f^oobarbaz |
1565+
f |
1566+
{1:~ }|*5
1567+
{5:-- INSERT --} |
1568+
]])
15601569
feed('<Down>')
1561-
screen:expect_unchanged()
1570+
screen:expect([[
1571+
foo |
1572+
foobar |
1573+
foobarbaz |
1574+
f^ |
1575+
{1:~ }|*5
1576+
{5:-- INSERT --} |
1577+
]])
15621578

15631579
feed('<esc>')
15641580
end)

test/old/testdir/test_ins_complete.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5608,7 +5608,6 @@ func Test_completetimeout_autocompletetimeout()
56085608

56095609
" Clock does not have fine granularity, so checking 'elapsed time' is only
56105610
" approximate. We can only test that some type of timeout is enforced.
5611-
call feedkeys("\<Esc>", 'xt!')
56125611
call setline(1, map(range(60000), '"foo" . v:val'))
56135612
set completetimeout=1
56145613
call feedkeys("Gof\<C-N>\<F2>\<Esc>0", 'xt!')
@@ -5626,7 +5625,6 @@ func Test_completetimeout_autocompletetimeout()
56265625
let match_count = len(b:matches->mapnew('v:val.word'))
56275626
call assert_true(match_count < 50000)
56285627

5629-
call feedkeys("\<Esc>", 'xt!')
56305628
set complete& omnifunc& autocomplete& autocompletetimeout& completetimeout&
56315629
bwipe!
56325630
%d
@@ -5676,8 +5674,10 @@ func Test_autocompletedelay()
56765674

56775675
" When menu is not open Up/Down moves cursor to different line
56785676
call term_sendkeys(buf, "\<Esc>Sf")
5679-
call term_sendkeys(buf, "\<Down>")
5677+
call term_sendkeys(buf, "\<Up>")
56805678
call VerifyScreenDump(buf, 'Test_autocompletedelay_10', {})
5679+
call term_sendkeys(buf, "\<Down>")
5680+
call VerifyScreenDump(buf, 'Test_autocompletedelay_11', {})
56815681

56825682
call term_sendkeys(buf, "\<esc>")
56835683
call StopVimInTerminal(buf)

0 commit comments

Comments
 (0)