comparison src/testdir/test_ins_complete.vim @ 17543:77c3f6428b6c v8.1.1769

patch 8.1.1769: 'shellslash' is also used for completion commit https://github.com/vim/vim/commit/ac3150d385e6e3f3fe76642aac3cda954d30583f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 28 16:36:39 2019 +0200 patch 8.1.1769: 'shellslash' is also used for completion Problem: 'shellslash' is also used for completion. Solution: Add the 'completeslash' option. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/3612)
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Jul 2019 16:45:05 +0200
parents fa6c9047ec70
children 76f2afc8cd93
comparison
equal deleted inserted replaced
17542:8ff04f492f46 17543:77c3f6428b6c
329 329
330 delcom TestCommand 330 delcom TestCommand
331 delcom GetInput 331 delcom GetInput
332 set wildmenu& wildchar& 332 set wildmenu& wildchar&
333 endfunc 333 endfunc
334
335 " Test for insert path completion with completeslash option
336 func Test_ins_completeslash()
337 if !has('win32')
338 return
339 endif
340
341 call mkdir('Xdir')
342
343 let orig_shellslash = &shellslash
344 set cpt&
345
346 new
347
348 set noshellslash
349
350 set completeslash=
351 exe "normal oXd\<C-X>\<C-F>"
352 call assert_equal('Xdir\', getline('.'))
353
354 set completeslash=backslash
355 exe "normal oXd\<C-X>\<C-F>"
356 call assert_equal('Xdir\', getline('.'))
357
358 set completeslash=slash
359 exe "normal oXd\<C-X>\<C-F>"
360 call assert_equal('Xdir/', getline('.'))
361
362 set shellslash
363
364 set completeslash=
365 exe "normal oXd\<C-X>\<C-F>"
366 call assert_equal('Xdir/', getline('.'))
367
368 set completeslash=backslash
369 exe "normal oXd\<C-X>\<C-F>"
370 call assert_equal('Xdir\', getline('.'))
371
372 set completeslash=slash
373 exe "normal oXd\<C-X>\<C-F>"
374 call assert_equal('Xdir/', getline('.'))
375 %bw!
376 call delete('Xdir', 'rf')
377
378 let &shellslash = orig_shellslash
379 endfunc
380