]> granicus.if.org Git - vim/commitdiff
patch 8.0.1200: tests switch the bell off twice v8.0.1200
authorBram Moolenaar <Bram@vim.org>
Sun, 15 Oct 2017 20:07:39 +0000 (22:07 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 15 Oct 2017 20:07:39 +0000 (22:07 +0200)
Problem:    Tests switch the bell off twice.
Solution:   Don't set 'belloff' in individual tests. (Christian Brabandt)

19 files changed:
src/testdir/test_alot.vim
src/testdir/test_alot_utf8.vim
src/testdir/test_autocmd.vim
src/testdir/test_cmdline.vim
src/testdir/test_diffmode.vim
src/testdir/test_digraph.vim
src/testdir/test_edit.vim
src/testdir/test_file_size.vim
src/testdir/test_gn.vim
src/testdir/test_normal.vim
src/testdir/test_packadd.vim
src/testdir/test_popup.vim
src/testdir/test_recover.vim
src/testdir/test_search.vim
src/testdir/test_textobjects.vim
src/testdir/test_undo.vim
src/testdir/test_usercommands.vim
src/testdir/test_visual.vim
src/version.c

index 189cd82d12d22359504af819c6d6b999baf5e72a..ad133033acb702d6775b492b65da13381448f86c 100644 (file)
@@ -1,7 +1,6 @@
 " A series of tests that can run in one Vim invocation.
 " This makes testing go faster, since Vim doesn't need to restart.
 
-set belloff=all
 source test_assign.vim
 source test_bufline.vim
 source test_cd.vim
index 8c9cfd2a9bbd6a7e39d27ae87a780bc8ca46898f..13e227b6ea2405bf8abdcfe1907e59e804813659 100644 (file)
@@ -5,7 +5,6 @@
 " runtest.vim.  Checking for the multi_byte feature is in the individual
 " files, so that they can be run by themselves.
 
-set belloff=all
 source test_charsearch_utf8.vim
 source test_expr_utf8.vim
 source test_matchadd_conceal_utf8.vim
index 49388a1a7a51a33a8cc90eadf5f57f93ac1f361d..593d1cc4098864cb5eb7064bf3d5f2605a47b59b 100644 (file)
@@ -1,6 +1,5 @@
 " Tests for autocommands
 
-set belloff=all
 
 func! s:cleanup_buffers() abort
   for bnr in range(1, bufnr('$'))
index f9499acf09b5698109199114df209c975879329f..ff190821cd4c106605bc8b12af024d8276c1e516 100644 (file)
@@ -1,6 +1,5 @@
 " Tests for editing the command line.
 
-set belloff=all
 
 func Test_complete_tab()
   call writefile(['testfile'], 'Xtestfile')
index c1dcfb8057fb93053e3ca4fb3e699798893d46e1..3273dcbd5fdc59795f5fbfee9a2f3fbb03babc88 100644 (file)
@@ -1,5 +1,4 @@
 " Tests for diff mode
-set belloff=all
 
 func Test_diff_fold_sync()
   enew!
index 30dc9a468337bd9f2f87982cc128cc8738ea666b..6290680305c48e3843355596aff487fdad717c8b 100644 (file)
@@ -3,7 +3,6 @@
 if !has("digraphs") || !has("multi_byte")
   finish
 endif
-set belloff=all
 
 func! Put_Dig(chars)
   exe "norm! o\<c-k>".a:chars
index cc9540c77ada0a6ecd47c898d973aff15f23faaf..3fcb8a3518bff869506afd1838889bf13f69d011 100644 (file)
@@ -3,7 +3,6 @@
 if exists("+t_kD")
   let &t_kD="\e[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
 
index 8dac3b2ac4c79842f40add6461cb67b9df909350..3e78a7b23c0b38fd95a20a652cfd9912c4deb871 100644 (file)
@@ -13,7 +13,7 @@ func Test_File_Size()
   endif
 
   new
-  set belloff=all fileformat=unix undolevels=-1
+  set fileformat=unix undolevels=-1
   for i in range(1, 2000000, 100)
       call append(i, range(i, i + 99))
   endfor
@@ -26,7 +26,7 @@ func Test_File_Size()
 
   enew!
   call delete('Xtest')
-  set belloff& fileformat& undolevels&
+  set fileformat& undolevels&
 endfunc
 
 " Test for writing and reading a file of over 100 Kbyte
index f56e707da1649042cc0618a46f9ca1bfc2689a87..7a77d9d88bb2d6a324db780463eac621762f63b1 100644 (file)
@@ -1,7 +1,6 @@
 " Test for gn command
 
 func Test_gn_command()
-  set belloff=all
   noautocmd new
   " replace a single char by itsself quoted:
   call setline('.', 'abc x def x ghi x jkl')
@@ -121,7 +120,6 @@ func Test_gn_command()
   sil! %d_
 
   set wrapscan&vim
-  set belloff&vim
 endfu
 
 " vim: shiftwidth=2 sts=2 expandtab
index b64b4e4074bb1c6f99de42dd83e7ed2e1c7ed599..f6b1a43b812e01a1bc2acdb93b7ea60794f1b753 100644 (file)
@@ -1,6 +1,5 @@
 " Test for various Normal mode commands
 
-set belloff=all
 func! Setup_NewWindow()
   10new
   call setline(1, range(1,100))
index 7dcaa60622976830591b9f1fc521069f74637ec9..66cbb4783486d330a42babfe7e9f31f78a510454 100644 (file)
@@ -1,6 +1,5 @@
 " Tests for 'packpath' and :packadd
 
-set belloff=all
 
 func SetUp()
   let s:topdir = expand('%:h') . '/Xdir'
index 917395bc9b2098845ed4966a0b9e89bb43412ebb..b770e560dc71cf1a3d698817922654105c45f8fd 100644 (file)
@@ -38,7 +38,6 @@ endfu
 func! Test_popup_complete()
   new
   inoremap <f5> <c-r>=ListMonths()<cr>
-  set belloff=all
 
   " <C-E> - select original typed text before the completion started
   call feedkeys("aJu\<f5>\<down>\<c-e>\<esc>", 'tx')
@@ -215,7 +214,6 @@ func! Test_popup_complete()
   call feedkeys("aM\<f5>\<enter>\<esc>", 'tx')
   call assert_equal(["March", "M", "March"], getline(1,4))
   %d
-  set belloff&
 endfu
 
 
@@ -517,7 +515,6 @@ endfunc
 
 func Test_completion_respect_bs_option()
   new
-  set belloff=all
   let li = ["aaa", "aaa12345", "aaaabcdef", "aaaABC"]
 
   set bs=indent,eol
@@ -533,7 +530,6 @@ func Test_completion_respect_bs_option()
   call feedkeys("A\<C-X>\<C-N>\<C-P>\<BS>\<BS>\<BS>\<Esc>", "tx")
   call assert_equal('', getline(1))
 
-  set belloff&
   bw!
 endfunc
 
@@ -620,7 +616,6 @@ endfunc
 
 func Test_complete_CTRLN_startofbuffer()
   new
-  set belloff=all
   call setline(1, [ 'organize(cupboard, 3, 2);',
         \ 'prioritize(bureau, 8, 7);',
         \ 'realize(bannister, 4, 4);',
@@ -631,7 +626,6 @@ func Test_complete_CTRLN_startofbuffer()
         \ 'railing.moralize(3,9);']
   call feedkeys("qai\<c-n>\<c-n>.\<esc>3wdW\<cr>q3@a", 'tx')
   call assert_equal(expected, getline(1,'$'))
-  set belloff&
   bwipe!
 endfunc
 
index 6f7ff2ba61e24d2c682e3cc7800ba763a8500338..a9934a162490bfd2476578cd8cef92ce9ad17eb2 100644 (file)
@@ -21,7 +21,7 @@ endfunc
 " We need about 10000 lines of 100 characters to get two levels of pointer
 " blocks.
 func Test_swap_file()
-  set fileformat=unix undolevels=-1 belloff=all
+  set fileformat=unix undolevels=-1
   edit! Xtest
   let text = "\tabcdefghijklmnoparstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnoparstuvwxyz0123456789"
   let i = 1
index 5ae101f1ecd295750aeeac964cc02f0755c2bcc0..e6a46ff1454cf3b98c2803b74ebcb298c1d4a6d5 100644 (file)
@@ -1,6 +1,5 @@
 " Test for the search command
 
-set belloff=all
 func Test_search_cmdline()
   if !exists('+incsearch')
     return
index 8b92ba15d9b37d459deae65506bb5cfab0fb140f..684f197f5f5d50907c4f0c47b2f09680240973e5 100644 (file)
@@ -4,7 +4,6 @@ if !has('textobjects')
   finish
 endif
 
-set belloff=all
 func CpoM(line, useM, expected)
   new
 
index e785c605da276d5232e8a90d4ac094f810d4da39..06732af71568dc72f34bcab8d8a8016ac577b9ab 100644 (file)
@@ -3,7 +3,6 @@
 " undo-able pieces.  Do that by setting 'undolevels'.
 " Also tests :earlier and :later.
 
-set belloff=all
 func Test_undotree()
   exe "normal Aabc\<Esc>"
   set ul=100
index 29db51f0a6230485883ebd4a2d3e67d6497b9f15..9420321ac992a14744c832083856d99da1468770 100644 (file)
@@ -1,7 +1,6 @@
 " Tests for user defined commands
 
 " Test for <mods> in user defined commands
-set belloff=all
 function Test_cmdmods()
   let g:mods = ''
 
index e4bd10079b7dfb1bd2e9bd5082ea683b66a10206..0e6231fd6da55a4174c92b1b0f5f9d08031c1ec7 100644 (file)
@@ -3,7 +3,6 @@ if !has('visual')
   finish
 endif
 
-set belloff=all
 
 func Test_block_shift_multibyte()
   " Uses double-wide character.
@@ -76,7 +75,6 @@ func TriggerTheProblem()
 endfunc
 
 func Test_visual_mode_reset()
-  set belloff=all
   enew
   let g:msg="Everything's fine."
   enew
@@ -89,5 +87,5 @@ func Test_visual_mode_reset()
   exe "normal! GV:call TriggerTheProblem()\<CR>"
   call assert_equal("Everything's fine.", g:msg)
 
-  set belloff&
 endfunc
+
index 5baff489a8a2174d02922900c4d1286b76a96eff..30a13fca266179fc38417df53e94970bcd54fb8a 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1200,
 /**/
     1199,
 /**/