1
0
forked from aniani/vim

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:
Bram Moolenaar
2020-07-11 22:25:57 +02:00
parent 9b7bf9e98f
commit 2b6ef856fb
4 changed files with 10 additions and 12 deletions

View 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'))