Mercurial > vim
view src/testdir/test_glob2regpat.vim @ 18235:88716bc1c20b v8.1.2112
patch 8.1.2112: build number for ConPTY is outdated
Commit: https://github.com/vim/vim/commit/4c063dde73c618b0728016d221ef130d9e9ec968
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Oct 4 21:29:12 2019 +0200
patch 8.1.2112: build number for ConPTY is outdated
Problem: Build number for ConPTY is outdated.
Solution: Update to new build number. (Nobuhiro Takasaki, closes https://github.com/vim/vim/issues/5014)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 04 Oct 2019 21:30:05 +0200 |
parents | 9fac6d0de69a |
children | 2a017e9dc6da |
line wrap: on
line source
" Test glob2regpat() func Test_glob2regpat_invalid() call assert_fails('call glob2regpat(1.33)', 'E806:') call assert_fails('call glob2regpat("}")', 'E219:') call assert_fails('call glob2regpat("{")', 'E220:') endfunc func Test_glob2regpat_valid() call assert_equal('^foo\.', glob2regpat('foo.*')) call assert_equal('^foo.$', 'foo?'->glob2regpat()) 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('.*', glob2regpat('**')) if exists('+shellslash') call assert_equal('^foo[\/].$', glob2regpat('foo\?')) 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\\}')) else call assert_equal('^foo?$', glob2regpat('foo\?')) 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\\}')) endif endfunc