comparison src/testdir/test_popup.vim @ 12644:1fad9675d8fd v8.0.1200

patch 8.0.1200: tests switch the bell off twice commit https://github.com/vim/vim/commit/67418d97b457d2e27fe342472d3c9fd342ffc47f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 15 22:07:39 2017 +0200 patch 8.0.1200: tests switch the bell off twice Problem: Tests switch the bell off twice. Solution: Don't set 'belloff' in individual tests. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Oct 2017 22:15:04 +0200
parents 9359ed49d375
children fad36581f788
comparison
equal deleted inserted replaced
12643:f88dfd7fd3bc 12644:1fad9675d8fd
36 endfu 36 endfu
37 37
38 func! Test_popup_complete() 38 func! Test_popup_complete()
39 new 39 new
40 inoremap <f5> <c-r>=ListMonths()<cr> 40 inoremap <f5> <c-r>=ListMonths()<cr>
41 set belloff=all
42 41
43 " <C-E> - select original typed text before the completion started 42 " <C-E> - select original typed text before the completion started
44 call feedkeys("aJu\<f5>\<down>\<c-e>\<esc>", 'tx') 43 call feedkeys("aJu\<f5>\<down>\<c-e>\<esc>", 'tx')
45 call assert_equal(["Ju"], getline(1,2)) 44 call assert_equal(["Ju"], getline(1,2))
46 %d 45 %d
213 call feedkeys("aM\<f5>\<enter>\<esc>", 'tx') 212 call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
214 set completeopt-=noselect completeopt+=noinsert 213 set completeopt-=noselect completeopt+=noinsert
215 call feedkeys("aM\<f5>\<enter>\<esc>", 'tx') 214 call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
216 call assert_equal(["March", "M", "March"], getline(1,4)) 215 call assert_equal(["March", "M", "March"], getline(1,4))
217 %d 216 %d
218 set belloff&
219 endfu 217 endfu
220 218
221 219
222 func! Test_popup_completion_insertmode() 220 func! Test_popup_completion_insertmode()
223 new 221 new
515 bw! 513 bw!
516 endfunc 514 endfunc
517 515
518 func Test_completion_respect_bs_option() 516 func Test_completion_respect_bs_option()
519 new 517 new
520 set belloff=all
521 let li = ["aaa", "aaa12345", "aaaabcdef", "aaaABC"] 518 let li = ["aaa", "aaa12345", "aaaabcdef", "aaaABC"]
522 519
523 set bs=indent,eol 520 set bs=indent,eol
524 call setline(1, li) 521 call setline(1, li)
525 1 522 1
531 call setline(1, li) 528 call setline(1, li)
532 1 529 1
533 call feedkeys("A\<C-X>\<C-N>\<C-P>\<BS>\<BS>\<BS>\<Esc>", "tx") 530 call feedkeys("A\<C-X>\<C-N>\<C-P>\<BS>\<BS>\<BS>\<Esc>", "tx")
534 call assert_equal('', getline(1)) 531 call assert_equal('', getline(1))
535 532
536 set belloff&
537 bw! 533 bw!
538 endfunc 534 endfunc
539 535
540 func CompleteUndo() abort 536 func CompleteUndo() abort
541 call complete(1, g:months) 537 call complete(1, g:months)
618 set completefunc= 614 set completefunc=
619 endfunc 615 endfunc
620 616
621 func Test_complete_CTRLN_startofbuffer() 617 func Test_complete_CTRLN_startofbuffer()
622 new 618 new
623 set belloff=all
624 call setline(1, [ 'organize(cupboard, 3, 2);', 619 call setline(1, [ 'organize(cupboard, 3, 2);',
625 \ 'prioritize(bureau, 8, 7);', 620 \ 'prioritize(bureau, 8, 7);',
626 \ 'realize(bannister, 4, 4);', 621 \ 'realize(bannister, 4, 4);',
627 \ 'moralize(railing, 3,9);']) 622 \ 'moralize(railing, 3,9);'])
628 let expected=['cupboard.organize(3, 2);', 623 let expected=['cupboard.organize(3, 2);',
629 \ 'bureau.prioritize(8, 7);', 624 \ 'bureau.prioritize(8, 7);',
630 \ 'bannister.realize(4, 4);', 625 \ 'bannister.realize(4, 4);',
631 \ 'railing.moralize(3,9);'] 626 \ 'railing.moralize(3,9);']
632 call feedkeys("qai\<c-n>\<c-n>.\<esc>3wdW\<cr>q3@a", 'tx') 627 call feedkeys("qai\<c-n>\<c-n>.\<esc>3wdW\<cr>q3@a", 'tx')
633 call assert_equal(expected, getline(1,'$')) 628 call assert_equal(expected, getline(1,'$'))
634 set belloff&
635 bwipe! 629 bwipe!
636 endfunc 630 endfunc
637 631
638 func Test_popup_and_window_resize() 632 func Test_popup_and_window_resize()
639 if !has('terminal') || has('gui_running') 633 if !has('terminal') || has('gui_running')