comparison src/testdir/test_assert.vim @ 13272:abaebba89fd4 v8.0.1510

patch 8.0.1510: cannot test if a command causes a beep commit https://github.com/vim/vim/commit/b48e96f61c87a64e38e3ac50732c92a84a4833b8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Feb 13 12:26:14 2018 +0100 patch 8.0.1510: cannot test if a command causes a beep Problem: Cannot test if a command causes a beep. Solution: Add assert_beeps().
author Christian Brabandt <cb@256bit.org>
date Tue, 13 Feb 2018 12:30:07 +0100
parents 1c4ebbae41d2
children a88c5e12b860
comparison
equal deleted inserted replaced
13271:c716b01fb96d 13272:abaebba89fd4
109 call assert_fails('xxx', {}) 109 call assert_fails('xxx', {})
110 call assert_match("Expected {} but got 'E731:", v:errors[0]) 110 call assert_match("Expected {} but got 'E731:", v:errors[0])
111 call remove(v:errors, 0) 111 call remove(v:errors, 0)
112 endfunc 112 endfunc
113 113
114 func Test_assert_beeps()
115 new
116 call assert_beeps('normal h')
117
118 call assert_beeps('normal 0')
119 call assert_match("command did not beep: normal 0", v:errors[0])
120 call remove(v:errors, 0)
121 bwipe
122 endfunc
123
114 func Test_assert_inrange() 124 func Test_assert_inrange()
115 call assert_inrange(7, 7, 7) 125 call assert_inrange(7, 7, 7)
116 call assert_inrange(5, 7, 5) 126 call assert_inrange(5, 7, 5)
117 call assert_inrange(5, 7, 6) 127 call assert_inrange(5, 7, 6)
118 call assert_inrange(5, 7, 7) 128 call assert_inrange(5, 7, 7)