Skip to content

Commit 67418d9

Browse files
committed
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)
1 parent 8bfe07b commit 67418d9

19 files changed

Lines changed: 6 additions & 43 deletions

src/testdir/test_alot.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
" A series of tests that can run in one Vim invocation.
22
" This makes testing go faster, since Vim doesn't need to restart.
33

4-
set belloff=all
54
source test_assign.vim
65
source test_bufline.vim
76
source test_cd.vim

src/testdir/test_alot_utf8.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
" runtest.vim. Checking for the multi_byte feature is in the individual
66
" files, so that they can be run by themselves.
77

8-
set belloff=all
98
source test_charsearch_utf8.vim
109
source test_expr_utf8.vim
1110
source test_matchadd_conceal_utf8.vim

src/testdir/test_autocmd.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
" Tests for autocommands
22

3-
set belloff=all
43

54
func! s:cleanup_buffers() abort
65
for bnr in range(1, bufnr('$'))

src/testdir/test_cmdline.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
" Tests for editing the command line.
22

3-
set belloff=all
43

54
func Test_complete_tab()
65
call writefile(['testfile'], 'Xtestfile')

src/testdir/test_diffmode.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
" Tests for diff mode
2-
set belloff=all
32

43
func Test_diff_fold_sync()
54
enew!

src/testdir/test_digraph.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
if !has("digraphs") || !has("multi_byte")
44
finish
55
endif
6-
set belloff=all
76

87
func! Put_Dig(chars)
98
exe "norm! o\<c-k>".a:chars

src/testdir/test_edit.vim

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
if exists("+t_kD")
44
let &t_kD="[3;*~"
55
endif
6-
set belloff=
76

87
" Needed for testing basic rightleft: Test_edit_rightleft
98
source view_util.vim
@@ -26,7 +25,6 @@ func! Test_edit_01()
2625
" set for Travis CI?
2726
" set nocp noesckeys
2827
new
29-
set belloff=backspace
3028
" 1) empty buffer
3129
call assert_equal([''], getline(1,'$'))
3230
" 2) delete in an empty line
@@ -59,7 +57,6 @@ func! Test_edit_01()
5957
call cursor(1, 1)
6058
call feedkeys("A\<del>\<esc>", 'tnix')
6159
call assert_equal(["abc def", "ghi jkl"], getline(1, 2))
62-
set belloff=
6360
let &bs=_bs
6461
bw!
6562
endfunc
@@ -475,13 +472,11 @@ func! Test_edit_00a_CTRL_A()
475472
new
476473
call setline(1, repeat([''], 5))
477474
call cursor(1, 1)
478-
set belloff=all
479475
try
480476
call feedkeys("A\<NUL>", 'tnix')
481477
catch /^Vim\%((\a\+)\)\=:E29/
482478
call assert_true(1, 'E29 error caught')
483479
endtry
484-
set belloff=
485480
call cursor(1, 1)
486481
call feedkeys("Afoobar \<esc>", 'tnix')
487482
call cursor(2, 1)
@@ -510,7 +505,6 @@ endfunc
510505

511506
func! Test_edit_CTRL_G()
512507
new
513-
set belloff=all
514508
call setline(1, ['foobar', 'foobar', 'foobar'])
515509
call cursor(2, 4)
516510
call feedkeys("ioooooooo\<c-g>k\<c-r>.\<esc>", 'tnix')
@@ -524,7 +518,6 @@ func! Test_edit_CTRL_G()
524518
call assert_equal([0, 3, 7, 0], getpos('.'))
525519
call feedkeys("i\<c-g>j\<esc>", 'tnix')
526520
call assert_equal([0, 3, 6, 0], getpos('.'))
527-
set belloff=
528521
bw!
529522
endfunc
530523

@@ -604,15 +597,13 @@ func! Test_edit_CTRL_K()
604597
%d
605598
call setline(1, 'A')
606599
call cursor(1, 1)
607-
set belloff=all
608600
let v:testing = 1
609601
try
610602
call feedkeys("A\<c-x>\<c-k>\<esc>", 'tnix')
611603
catch
612604
" error sleeps 2 seconds, when v:testing is not set
613605
let v:testing = 0
614606
endtry
615-
set belloff=
616607
call delete('Xdictionary.txt')
617608

618609
if has("multi_byte")
@@ -853,15 +844,13 @@ func! Test_edit_CTRL_T()
853844
%d
854845
call setline(1, 'mad')
855846
call cursor(1, 1)
856-
set belloff=all
857847
let v:testing = 1
858848
try
859849
call feedkeys("A\<c-x>\<c-t>\<esc>", 'tnix')
860850
catch
861851
" error sleeps 2 seconds, when v:testing is not set
862852
let v:testing = 0
863853
endtry
864-
set belloff=
865854
call assert_equal(['mad'], getline(1, '$'))
866855
call delete('Xthesaurus')
867856
bw!
@@ -1033,7 +1022,6 @@ endfunc
10331022
func! Test_edit_LEFT_RIGHT()
10341023
" Left, Shift-Left, Right, Shift-Right
10351024
new
1036-
set belloff=all
10371025
call setline(1, ['abc def ghi', 'ABC DEF GHI', 'ZZZ YYY XXX'])
10381026
let _ww=&ww
10391027
set ww=
@@ -1075,7 +1063,6 @@ func! Test_edit_LEFT_RIGHT()
10751063
call feedkeys("A\<s-right>\<esc>", 'tnix')
10761064
call assert_equal([0, 3, 1, 0], getpos('.'))
10771065
let &ww = _ww
1078-
set belloff=
10791066
bw!
10801067
endfunc
10811068

@@ -1135,7 +1122,6 @@ func! Test_edit_MOUSE()
11351122
endfunc
11361123

11371124
func! Test_edit_PAGEUP_PAGEDOWN()
1138-
set belloff=all
11391125
10new
11401126
call setline(1, repeat(['abc def ghi'], 30))
11411127
call cursor(1, 1)
@@ -1231,12 +1217,10 @@ func! Test_edit_PAGEUP_PAGEDOWN()
12311217
call assert_equal([0, 30, 11, 0], getpos('.'))
12321218
call feedkeys("A\<S-Down>\<esc>", 'tnix')
12331219
call assert_equal([0, 30, 11, 0], getpos('.'))
1234-
set startofline belloff=
12351220
bw!
12361221
endfunc
12371222

12381223
func! Test_edit_forbidden()
1239-
set belloff=error,esc
12401224
new
12411225
" 1) edit in the sandbox is not allowed
12421226
call setline(1, 'a')
@@ -1293,7 +1277,6 @@ func! Test_edit_forbidden()
12931277
set norevins nofkmap
12941278
endtry
12951279
endif
1296-
set belloff=
12971280
bw!
12981281
endfunc
12991282

src/testdir/test_file_size.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func Test_File_Size()
1313
endif
1414

1515
new
16-
set belloff=all fileformat=unix undolevels=-1
16+
set fileformat=unix undolevels=-1
1717
for i in range(1, 2000000, 100)
1818
call append(i, range(i, i + 99))
1919
endfor
@@ -26,7 +26,7 @@ func Test_File_Size()
2626

2727
enew!
2828
call delete('Xtest')
29-
set belloff& fileformat& undolevels&
29+
set fileformat& undolevels&
3030
endfunc
3131

3232
" Test for writing and reading a file of over 100 Kbyte

src/testdir/test_gn.vim

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
" Test for gn command
22

33
func Test_gn_command()
4-
set belloff=all
54
noautocmd new
65
" replace a single char by itsself quoted:
76
call setline('.', 'abc x def x ghi x jkl')
@@ -121,7 +120,6 @@ func Test_gn_command()
121120
sil! %d_
122121

123122
set wrapscan&vim
124-
set belloff&vim
125123
endfu
126124

127125
" vim: shiftwidth=2 sts=2 expandtab

src/testdir/test_normal.vim

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
" Test for various Normal mode commands
22

3-
set belloff=all
43
func! Setup_NewWindow()
54
10new
65
call setline(1, range(1,100))

0 commit comments

Comments
 (0)