1
0
forked from aniani/vim

patch 8.2.1183: assert_fails() checks the last error message

Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.
This commit is contained in:
Bram Moolenaar
2020-07-11 22:14:59 +02:00
parent 914e7eaa67
commit 9b7bf9e98f
53 changed files with 225 additions and 152 deletions

View File

@@ -855,7 +855,7 @@ func Test_cmdline_search_range()
call assert_equal('B', getline(2))
let @/ = 'apple'
call assert_fails('\/print', 'E486:')
call assert_fails('\/print', ['E486:.*apple'])
bwipe!
endfunc
@@ -972,7 +972,7 @@ func Test_verbosefile()
call assert_match("foo\nbar", join(log, "\n"))
call delete('Xlog')
call mkdir('Xdir')
call assert_fails('set verbosefile=Xdir', 'E474:')
call assert_fails('set verbosefile=Xdir', ['E484:.*Xdir', 'E474:'])
call delete('Xdir', 'd')
endfunc
@@ -1208,7 +1208,7 @@ func Test_cmdwin_jump_to_win()
call assert_fails('call feedkeys("q:\<C-W>\<C-W>\<CR>", "xt")', 'E11:')
new
set modified
call assert_fails('call feedkeys("q/:qall\<CR>", "xt")', 'E162:')
call assert_fails('call feedkeys("q/:qall\<CR>", "xt")', ['E37:', 'E162:'])
close!
call feedkeys("q/:close\<CR>", "xt")
call assert_equal(1, winnr('$'))