diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-08 22:42:04 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-08 22:42:04 +0200 |
commit | 71dd9744cf3842cd45295010d2e5692da1651537 (patch) | |
tree | 6cf2ee69ba7ac037a2cdce24e4c223dc1c7ff820 /src | |
parent | 7a9a5f4019ce332cb11ce5370e3fa609299ce737 (diff) |
patch 7.4.2185v7.4.2185
Problem: Test glob2regpat does not test much.
Solution: Add a few more test cases. (Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_glob2regpat.vim | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/testdir/test_glob2regpat.vim b/src/testdir/test_glob2regpat.vim index 250ab2746c..52d8a33279 100644 --- a/src/testdir/test_glob2regpat.vim +++ b/src/testdir/test_glob2regpat.vim @@ -2,9 +2,21 @@ func Test_invalid() call assert_fails('call glob2regpat(1.33)', 'E806:') + call assert_fails('call glob2regpat("}")', 'E219:') + call assert_fails('call glob2regpat("{")', 'E220:') endfunc func Test_valid() call assert_equal('^foo\.', glob2regpat('foo.*')) + call assert_equal('^foo.$', glob2regpat('foo?')) + call assert_equal('^foo?$', glob2regpat('foo\?')) call assert_equal('\.vim$', glob2regpat('*.vim')) + call assert_equal('^[abc]$', glob2regpat('[abc]')) + call assert_equal('^foo bar$', glob2regpat('foo\ bar')) + call assert_equal('^foo,bar$', glob2regpat('foo,bar')) + call assert_equal('^\(foo\|bar\)$', glob2regpat('{foo,bar}')) + call assert_equal('^\(foo,bar\|foobar\)$', glob2regpat('{foo\,bar,foobar}')) + call assert_equal('^{foo,bar}$', glob2regpat('\{foo,bar\}')) + call assert_equal('^\\\(foo\|bar\\\)$', glob2regpat('\\{foo,bar\\}')) + call assert_equal('.*', glob2regpat('**')) endfunc diff --git a/src/version.c b/src/version.c index bb34f29ed2..d53935e904 100644 --- a/src/version.c +++ b/src/version.c @@ -764,6 +764,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2185, +/**/ 2184, /**/ 2183, |