comparison src/testdir/test_visual.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 7d7835ab8b37
children aa658b33f25a
comparison
equal deleted inserted replaced
12643:f88dfd7fd3bc 12644:1fad9675d8fd
1 " Tests for various Visual mode. 1 " Tests for various Visual mode.
2 if !has('visual') 2 if !has('visual')
3 finish 3 finish
4 endif 4 endif
5 5
6 set belloff=all
7 6
8 func Test_block_shift_multibyte() 7 func Test_block_shift_multibyte()
9 " Uses double-wide character. 8 " Uses double-wide character.
10 if !has('multi_byte') 9 if !has('multi_byte')
11 return 10 return
74 let g:msg='Snap! E315 error!' 73 let g:msg='Snap! E315 error!'
75 endtry 74 endtry
76 endfunc 75 endfunc
77 76
78 func Test_visual_mode_reset() 77 func Test_visual_mode_reset()
79 set belloff=all
80 enew 78 enew
81 let g:msg="Everything's fine." 79 let g:msg="Everything's fine."
82 enew 80 enew
83 setl buftype=nofile 81 setl buftype=nofile
84 call append(line('$'), 'Delete this line.') 82 call append(line('$'), 'Delete this line.')
87 " the ex-way will require the colon operator which resets the visual mode 85 " the ex-way will require the colon operator which resets the visual mode
88 " thus preventing the problem: 86 " thus preventing the problem:
89 exe "normal! GV:call TriggerTheProblem()\<CR>" 87 exe "normal! GV:call TriggerTheProblem()\<CR>"
90 call assert_equal("Everything's fine.", g:msg) 88 call assert_equal("Everything's fine.", g:msg)
91 89
92 set belloff&
93 endfunc 90 endfunc
91