mirror of
https://github.com/vim/vim.git
synced 2025-10-18 07:54:29 -04:00
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)
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
if exists("+t_kD")
|
||||
let &t_kD="[3;*~"
|
||||
endif
|
||||
set belloff=
|
||||
|
||||
" Needed for testing basic rightleft: Test_edit_rightleft
|
||||
source view_util.vim
|
||||
@@ -26,7 +25,6 @@ func! Test_edit_01()
|
||||
" set for Travis CI?
|
||||
" set nocp noesckeys
|
||||
new
|
||||
set belloff=backspace
|
||||
" 1) empty buffer
|
||||
call assert_equal([''], getline(1,'$'))
|
||||
" 2) delete in an empty line
|
||||
@@ -59,7 +57,6 @@ func! Test_edit_01()
|
||||
call cursor(1, 1)
|
||||
call feedkeys("A\<del>\<esc>", 'tnix')
|
||||
call assert_equal(["abc def", "ghi jkl"], getline(1, 2))
|
||||
set belloff=
|
||||
let &bs=_bs
|
||||
bw!
|
||||
endfunc
|
||||
@@ -475,13 +472,11 @@ func! Test_edit_00a_CTRL_A()
|
||||
new
|
||||
call setline(1, repeat([''], 5))
|
||||
call cursor(1, 1)
|
||||
set belloff=all
|
||||
try
|
||||
call feedkeys("A\<NUL>", 'tnix')
|
||||
catch /^Vim\%((\a\+)\)\=:E29/
|
||||
call assert_true(1, 'E29 error caught')
|
||||
endtry
|
||||
set belloff=
|
||||
call cursor(1, 1)
|
||||
call feedkeys("Afoobar \<esc>", 'tnix')
|
||||
call cursor(2, 1)
|
||||
@@ -510,7 +505,6 @@ endfunc
|
||||
|
||||
func! Test_edit_CTRL_G()
|
||||
new
|
||||
set belloff=all
|
||||
call setline(1, ['foobar', 'foobar', 'foobar'])
|
||||
call cursor(2, 4)
|
||||
call feedkeys("ioooooooo\<c-g>k\<c-r>.\<esc>", 'tnix')
|
||||
@@ -524,7 +518,6 @@ func! Test_edit_CTRL_G()
|
||||
call assert_equal([0, 3, 7, 0], getpos('.'))
|
||||
call feedkeys("i\<c-g>j\<esc>", 'tnix')
|
||||
call assert_equal([0, 3, 6, 0], getpos('.'))
|
||||
set belloff=
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
@@ -604,7 +597,6 @@ func! Test_edit_CTRL_K()
|
||||
%d
|
||||
call setline(1, 'A')
|
||||
call cursor(1, 1)
|
||||
set belloff=all
|
||||
let v:testing = 1
|
||||
try
|
||||
call feedkeys("A\<c-x>\<c-k>\<esc>", 'tnix')
|
||||
@@ -612,7 +604,6 @@ func! Test_edit_CTRL_K()
|
||||
" error sleeps 2 seconds, when v:testing is not set
|
||||
let v:testing = 0
|
||||
endtry
|
||||
set belloff=
|
||||
call delete('Xdictionary.txt')
|
||||
|
||||
if has("multi_byte")
|
||||
@@ -853,7 +844,6 @@ func! Test_edit_CTRL_T()
|
||||
%d
|
||||
call setline(1, 'mad')
|
||||
call cursor(1, 1)
|
||||
set belloff=all
|
||||
let v:testing = 1
|
||||
try
|
||||
call feedkeys("A\<c-x>\<c-t>\<esc>", 'tnix')
|
||||
@@ -861,7 +851,6 @@ func! Test_edit_CTRL_T()
|
||||
" error sleeps 2 seconds, when v:testing is not set
|
||||
let v:testing = 0
|
||||
endtry
|
||||
set belloff=
|
||||
call assert_equal(['mad'], getline(1, '$'))
|
||||
call delete('Xthesaurus')
|
||||
bw!
|
||||
@@ -1033,7 +1022,6 @@ endfunc
|
||||
func! Test_edit_LEFT_RIGHT()
|
||||
" Left, Shift-Left, Right, Shift-Right
|
||||
new
|
||||
set belloff=all
|
||||
call setline(1, ['abc def ghi', 'ABC DEF GHI', 'ZZZ YYY XXX'])
|
||||
let _ww=&ww
|
||||
set ww=
|
||||
@@ -1075,7 +1063,6 @@ func! Test_edit_LEFT_RIGHT()
|
||||
call feedkeys("A\<s-right>\<esc>", 'tnix')
|
||||
call assert_equal([0, 3, 1, 0], getpos('.'))
|
||||
let &ww = _ww
|
||||
set belloff=
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
@@ -1135,7 +1122,6 @@ func! Test_edit_MOUSE()
|
||||
endfunc
|
||||
|
||||
func! Test_edit_PAGEUP_PAGEDOWN()
|
||||
set belloff=all
|
||||
10new
|
||||
call setline(1, repeat(['abc def ghi'], 30))
|
||||
call cursor(1, 1)
|
||||
@@ -1231,12 +1217,10 @@ func! Test_edit_PAGEUP_PAGEDOWN()
|
||||
call assert_equal([0, 30, 11, 0], getpos('.'))
|
||||
call feedkeys("A\<S-Down>\<esc>", 'tnix')
|
||||
call assert_equal([0, 30, 11, 0], getpos('.'))
|
||||
set startofline belloff=
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
func! Test_edit_forbidden()
|
||||
set belloff=error,esc
|
||||
new
|
||||
" 1) edit in the sandbox is not allowed
|
||||
call setline(1, 'a')
|
||||
@@ -1293,7 +1277,6 @@ func! Test_edit_forbidden()
|
||||
set norevins nofkmap
|
||||
endtry
|
||||
endif
|
||||
set belloff=
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
|
Reference in New Issue
Block a user