diff src/testdir/test_ins_complete.vim @ 17588:1348696d07cd v8.1.1791

patch 8.1.1791: 'completeslash' also applies to globpath() commit https://github.com/vim/vim/commit/50f91d22bd81819d5d946f6c38252c7922120ec6 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 2 19:52:15 2019 +0200 patch 8.1.1791: 'completeslash' also applies to globpath() Problem: 'completeslash' also applies to globpath(). Solution: Add the WILD_IGNORE_COMPLETESLASH flag. (test by Yasuhiro Matsumoto, closes #4760)
author Bram Moolenaar <Bram@vim.org>
date Fri, 02 Aug 2019 20:00:07 +0200
parents 76f2afc8cd93
children fb2d26bc8ca1
line wrap: on
line diff
--- a/src/testdir/test_ins_complete.vim
+++ b/src/testdir/test_ins_complete.vim
@@ -1,3 +1,4 @@
+source check.vim
 
 " Test for insert expansion
 func Test_ins_complete()
@@ -334,15 +335,11 @@ endfunc
 
 " Test for insert path completion with completeslash option
 func Test_ins_completeslash()
-  if !has('win32')
-    throw 'Skipped: only works on MS-Windows'
-  endif
+  CheckMSWindows
   
   call mkdir('Xdir')
-
   let orig_shellslash = &shellslash
   set cpt&
-
   new
   
   set noshellslash
@@ -375,6 +372,11 @@ func Test_ins_completeslash()
   %bw!
   call delete('Xdir', 'rf')
 
+  set noshellslash
+  set completeslash=slash
+  call assert_true(stridx(globpath(&rtp, 'syntax/*.vim', 1, 1)[0], '\') != -1)
+
   let &shellslash = orig_shellslash
+  set completeslash=
 endfunc