Mercurial > vim
comparison src/testdir/test_regexp_latin.vim @ 15486:b143545e3354 v8.1.0751
patch 8.1.0751: some regexp errors are not tested
commit https://github.com/vim/vim/commit/6057ed4720eaa1d546bbd234e6957ec0163e0e9b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 14 23:19:29 2019 +0100
patch 8.1.0751: some regexp errors are not tested
Problem: Some regexp errors are not tested.
Solution: Add a test function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 14 Jan 2019 23:30:05 +0100 |
parents | 14b6b79d685b |
children | 481452f6687c |
comparison
equal
deleted
inserted
replaced
15485:d4b1701c77d2 | 15486:b143545e3354 |
---|---|
70 call assert_equal(3, search('\%#=2\(e\)\1')) | 70 call assert_equal(3, search('\%#=2\(e\)\1')) |
71 call assert_fails('call search("\\%#=1\\(e\\1\\)")', 'E65:') | 71 call assert_fails('call search("\\%#=1\\(e\\1\\)")', 'E65:') |
72 call assert_fails('call search("\\%#=2\\(e\\1\\)")', 'E65:') | 72 call assert_fails('call search("\\%#=2\\(e\\1\\)")', 'E65:') |
73 bwipe! | 73 bwipe! |
74 endfunc | 74 endfunc |
75 | |
76 func Test_multi_failure() | |
77 set re=1 | |
78 call assert_fails('/a**', 'E61:') | |
79 call assert_fails('/a*\+', 'E62:') | |
80 call assert_fails('/a\{a}', 'E554:') | |
81 set re=2 | |
82 call assert_fails('/a**', 'E871:') | |
83 call assert_fails('/a*\+', 'E871:') | |
84 call assert_fails('/a\{a}', 'E870:') | |
85 set re=0 | |
86 endfunc |