Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
17587:f4d6636bc399 | 17588:1348696d07cd |
---|---|
1 source check.vim | |
1 | 2 |
2 " Test for insert expansion | 3 " Test for insert expansion |
3 func Test_ins_complete() | 4 func Test_ins_complete() |
4 edit test_ins_complete.vim | 5 edit test_ins_complete.vim |
5 " The files in the current directory interferes with the files | 6 " The files in the current directory interferes with the files |
332 set wildmenu& wildchar& | 333 set wildmenu& wildchar& |
333 endfunc | 334 endfunc |
334 | 335 |
335 " Test for insert path completion with completeslash option | 336 " Test for insert path completion with completeslash option |
336 func Test_ins_completeslash() | 337 func Test_ins_completeslash() |
337 if !has('win32') | 338 CheckMSWindows |
338 throw 'Skipped: only works on MS-Windows' | |
339 endif | |
340 | 339 |
341 call mkdir('Xdir') | 340 call mkdir('Xdir') |
342 | |
343 let orig_shellslash = &shellslash | 341 let orig_shellslash = &shellslash |
344 set cpt& | 342 set cpt& |
345 | |
346 new | 343 new |
347 | 344 |
348 set noshellslash | 345 set noshellslash |
349 | 346 |
350 set completeslash= | 347 set completeslash= |
373 exe "normal oXd\<C-X>\<C-F>" | 370 exe "normal oXd\<C-X>\<C-F>" |
374 call assert_equal('Xdir/', getline('.')) | 371 call assert_equal('Xdir/', getline('.')) |
375 %bw! | 372 %bw! |
376 call delete('Xdir', 'rf') | 373 call delete('Xdir', 'rf') |
377 | 374 |
375 set noshellslash | |
376 set completeslash=slash | |
377 call assert_true(stridx(globpath(&rtp, 'syntax/*.vim', 1, 1)[0], '\') != -1) | |
378 | |
378 let &shellslash = orig_shellslash | 379 let &shellslash = orig_shellslash |
379 endfunc | 380 set completeslash= |
380 | 381 endfunc |
382 |