diff src/testdir/test_glob2regpat.vim @ 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 6882920b42da
children f8396c6e5709
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