]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.1184: some tests fail v8.2.1184
authorBram Moolenaar <Bram@vim.org>
Sat, 11 Jul 2020 20:25:57 +0000 (22:25 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 11 Jul 2020 20:25:57 +0000 (22:25 +0200)
Problem:    Some tests fail.
Solution:   Adjust tests for different assert_fails() behavior.  Remove unused
            variable.

src/evalvars.c
src/testdir/test_assert.vim
src/testdir/test_eval_stuff.vim
src/version.c

index 70660397c7255db71dbbcfb7e4daff9330c5d46d..6e67206dc70c65984391b2d4c90e288587d2359c 100644 (file)
@@ -3389,7 +3389,6 @@ static char_u     *redir_varname = NULL;
 var_redir_start(char_u *name, int append)
 {
     int                called_emsg_before;
-    int                err;
     typval_T   tv;
 
     // Catch a bad name early.
index c2d055c95e9a71504d6b5a78f95d37a94d68e671..0ec710a14c339d89e277000bae89280ca7c09f0d 100644 (file)
@@ -208,12 +208,12 @@ func Test_notmatch()
 endfunc
 
 func Test_assert_fail_fails()
-  call assert_equal(1, assert_fails('xxx', {}))
-  call assert_match("Expected {} but got 'E731:", v:errors[0])
+  call assert_equal(1, assert_fails('xxx', 'E12345'))
+  call assert_match("Expected 'E12345' but got 'E492:", v:errors[0])
   call remove(v:errors, 0)
 
-  call assert_equal(1, assert_fails('xxx', {}, 'stupid'))
-  call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])
+  call assert_equal(1, assert_fails('xxx', 'E9876', 'stupid'))
+  call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0])
   call remove(v:errors, 0)
 
   call assert_equal(1, assert_fails('echo', '', 'echo command'))
index 3a229b5c1a3f8d09031baf329b6dd968b299e332..6d95cc033865bc366c48eaf3daa9debf7d6be0ca 100644 (file)
@@ -1,5 +1,7 @@
 " Tests for various eval things.
 
+source view_util.vim
+
 function s:foo() abort
   try
     return [] == 0
@@ -17,13 +19,8 @@ func Test_nocatch_restore_silent_emsg()
     throw 1
   catch
   endtry
-  echoerr 'wrong'
-  let c1 = nr2char(screenchar(&lines, 1))
-  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)
+  echoerr 'wrong again'
+  call assert_equal('wrong again', ScreenLine(&lines))
 endfunc
 
 func Test_mkdir_p()
index ece1006d3f06c62cbdb13793d1cbc3f7d2b1f6ed..7c3ee485f4073ca1ebeca5d82a4835443585eac9 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1184,
 /**/
     1183,
 /**/