Skip to content

Commit 2b6ef85

Browse files
committed
patch 8.2.1184: some tests fail
Problem: Some tests fail. Solution: Adjust tests for different assert_fails() behavior. Remove unused variable.
1 parent 9b7bf9e commit 2b6ef85

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

src/evalvars.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3389,7 +3389,6 @@ static char_u *redir_varname = NULL;
33893389
var_redir_start(char_u *name, int append)
33903390
{
33913391
int called_emsg_before;
3392-
int err;
33933392
typval_T tv;
33943393

33953394
// Catch a bad name early.

src/testdir/test_assert.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ func Test_notmatch()
208208
endfunc
209209

210210
func Test_assert_fail_fails()
211-
call assert_equal(1, assert_fails('xxx', {}))
212-
call assert_match("Expected {} but got 'E731:", v:errors[0])
211+
call assert_equal(1, assert_fails('xxx', 'E12345'))
212+
call assert_match("Expected 'E12345' but got 'E492:", v:errors[0])
213213
call remove(v:errors, 0)
214214

215-
call assert_equal(1, assert_fails('xxx', {}, 'stupid'))
216-
call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])
215+
call assert_equal(1, assert_fails('xxx', 'E9876', 'stupid'))
216+
call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0])
217217
call remove(v:errors, 0)
218218

219219
call assert_equal(1, assert_fails('echo', '', 'echo command'))

src/testdir/test_eval_stuff.vim

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
" Tests for various eval things.
22

3+
source view_util.vim
4+
35
function s:foo() abort
46
try
57
return [] == 0
@@ -17,13 +19,8 @@ func Test_nocatch_restore_silent_emsg()
1719
throw 1
1820
catch
1921
endtry
20-
echoerr 'wrong'
21-
let c1 = nr2char(screenchar(&lines, 1))
22-
let c2 = nr2char(screenchar(&lines, 2))
23-
let c3 = nr2char(screenchar(&lines, 3))
24-
let c4 = nr2char(screenchar(&lines, 4))
25-
let c5 = nr2char(screenchar(&lines, 5))
26-
call assert_equal('wrong', c1 . c2 . c3 . c4 . c5)
22+
echoerr 'wrong again'
23+
call assert_equal('wrong again', ScreenLine(&lines))
2724
endfunc
2825

2926
func Test_mkdir_p()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1184,
757759
/**/
758760
1183,
759761
/**/

0 commit comments

Comments
 (0)