Mercurial > vim
changeset 9824:0524e72c9023 v7.4.2187
commit https://github.com/vim/vim/commit/7547a78446c1a3c04b36c0533f0f046188bd378b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 8 23:26:51 2016 +0200
patch 7.4.2187
Problem: glob2regpat test fails on Windows.
Solution: Remove the checks that use backslashes.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 08 Aug 2016 23:30:06 +0200 |
parents | def3b44e1ae1 |
children | 9942f894e709 |
files | src/testdir/test_glob2regpat.vim src/version.c |
diffstat | 2 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_glob2regpat.vim +++ b/src/testdir/test_glob2regpat.vim @@ -9,14 +9,18 @@ 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('**')) + + if has('unix') + 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\\}')) + " todo: Windows + endif endfunc