diff options
Diffstat (limited to 'src/testdir/test_assert.vim')
-rw-r--r-- | src/testdir/test_assert.vim | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index 01e7718bb6..5d4abaa8a9 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -276,6 +276,21 @@ func Test_assert_fail_fails() call assert_match("E1222: String or List required for argument 2", exp) try + call assert_equal(0, assert_fails('xxx', [#{one: 1}])) + catch + let exp = v:exception + endtry + call assert_match("E731: Using a Dictionary as a String", exp) + + let exp = '' + try + call assert_equal(0, assert_fails('xxx', ['E492', #{one: 1}])) + catch + let exp = v:exception + endtry + call assert_match("E731: Using a Dictionary as a String", exp) + + try call assert_equal(1, assert_fails('xxx', 'E492', '', 'burp')) catch let exp = v:exception @@ -289,8 +304,8 @@ func Test_assert_fail_fails() endtry call assert_match("E1174: String required for argument 5", exp) - call assert_equal(1, assert_fails('c0', ['', '\1'])) - call assert_match("Expected '\\\\\\\\1' but got 'E939: Positive count required: c0': c0", v:errors[0]) + call assert_equal(1, assert_fails('c0', ['', '\(.\)\1'])) + call assert_match("Expected '\\\\\\\\(.\\\\\\\\)\\\\\\\\1' but got 'E939: Positive count required: c0': c0", v:errors[0]) call remove(v:errors, 0) endfunc |