Mercurial > vim
comparison src/testdir/test_assert.vim @ 21267:7833afe1c66e v8.2.1184
patch 8.2.1184: some tests fail
Commit: https://github.com/vim/vim/commit/2b6ef856fb89f703714f3f1f567d9bd7c81079f3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 11 22:25:57 2020 +0200
patch 8.2.1184: some tests fail
Problem: Some tests fail.
Solution: Adjust tests for different assert_fails() behavior. Remove unused
variable.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 11 Jul 2020 22:30:08 +0200 |
parents | 9a624c1672a3 |
children | 3ef53d66f30d |
comparison
equal
deleted
inserted
replaced
21266:4be9fc44d659 | 21267:7833afe1c66e |
---|---|
206 call assert_match("Pattern 'foo' does match 'foobar'", v:errors[0]) | 206 call assert_match("Pattern 'foo' does match 'foobar'", v:errors[0]) |
207 call remove(v:errors, 0) | 207 call remove(v:errors, 0) |
208 endfunc | 208 endfunc |
209 | 209 |
210 func Test_assert_fail_fails() | 210 func Test_assert_fail_fails() |
211 call assert_equal(1, assert_fails('xxx', {})) | 211 call assert_equal(1, assert_fails('xxx', 'E12345')) |
212 call assert_match("Expected {} but got 'E731:", v:errors[0]) | 212 call assert_match("Expected 'E12345' but got 'E492:", v:errors[0]) |
213 call remove(v:errors, 0) | 213 call remove(v:errors, 0) |
214 | 214 |
215 call assert_equal(1, assert_fails('xxx', {}, 'stupid')) | 215 call assert_equal(1, assert_fails('xxx', 'E9876', 'stupid')) |
216 call assert_match("stupid: Expected {} but got 'E731:", v:errors[0]) | 216 call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0]) |
217 call remove(v:errors, 0) | 217 call remove(v:errors, 0) |
218 | 218 |
219 call assert_equal(1, assert_fails('echo', '', 'echo command')) | 219 call assert_equal(1, assert_fails('echo', '', 'echo command')) |
220 call assert_match("command did not fail: echo command", v:errors[0]) | 220 call assert_match("command did not fail: echo command", v:errors[0]) |
221 call remove(v:errors, 0) | 221 call remove(v:errors, 0) |