mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1184: some tests fail
Problem: Some tests fail. Solution: Adjust tests for different assert_fails() behavior. Remove unused variable.
This commit is contained in:
@@ -3389,7 +3389,6 @@ static char_u *redir_varname = NULL;
|
|||||||
var_redir_start(char_u *name, int append)
|
var_redir_start(char_u *name, int append)
|
||||||
{
|
{
|
||||||
int called_emsg_before;
|
int called_emsg_before;
|
||||||
int err;
|
|
||||||
typval_T tv;
|
typval_T tv;
|
||||||
|
|
||||||
// Catch a bad name early.
|
// Catch a bad name early.
|
||||||
|
@@ -208,12 +208,12 @@ func Test_notmatch()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_assert_fail_fails()
|
func Test_assert_fail_fails()
|
||||||
call assert_equal(1, assert_fails('xxx', {}))
|
call assert_equal(1, assert_fails('xxx', 'E12345'))
|
||||||
call assert_match("Expected {} but got 'E731:", v:errors[0])
|
call assert_match("Expected 'E12345' but got 'E492:", v:errors[0])
|
||||||
call remove(v:errors, 0)
|
call remove(v:errors, 0)
|
||||||
|
|
||||||
call assert_equal(1, assert_fails('xxx', {}, 'stupid'))
|
call assert_equal(1, assert_fails('xxx', 'E9876', 'stupid'))
|
||||||
call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])
|
call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0])
|
||||||
call remove(v:errors, 0)
|
call remove(v:errors, 0)
|
||||||
|
|
||||||
call assert_equal(1, assert_fails('echo', '', 'echo command'))
|
call assert_equal(1, assert_fails('echo', '', 'echo command'))
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
" Tests for various eval things.
|
" Tests for various eval things.
|
||||||
|
|
||||||
|
source view_util.vim
|
||||||
|
|
||||||
function s:foo() abort
|
function s:foo() abort
|
||||||
try
|
try
|
||||||
return [] == 0
|
return [] == 0
|
||||||
@@ -17,13 +19,8 @@ func Test_nocatch_restore_silent_emsg()
|
|||||||
throw 1
|
throw 1
|
||||||
catch
|
catch
|
||||||
endtry
|
endtry
|
||||||
echoerr 'wrong'
|
echoerr 'wrong again'
|
||||||
let c1 = nr2char(screenchar(&lines, 1))
|
call assert_equal('wrong again', ScreenLine(&lines))
|
||||||
let c2 = nr2char(screenchar(&lines, 2))
|
|
||||||
let c3 = nr2char(screenchar(&lines, 3))
|
|
||||||
let c4 = nr2char(screenchar(&lines, 4))
|
|
||||||
let c5 = nr2char(screenchar(&lines, 5))
|
|
||||||
call assert_equal('wrong', c1 . c2 . c3 . c4 . c5)
|
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_mkdir_p()
|
func Test_mkdir_p()
|
||||||
|
@@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1184,
|
||||||
/**/
|
/**/
|
||||||
1183,
|
1183,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user