comparison src/testdir/test_ins_complete.vim @ 22397:0a5770061295 v8.2.1747

patch 8.2.1747: result of expand() unexpectedly depends on 'completeslash' Commit: https://github.com/vim/vim/commit/8f187fc6304222956f94a700758a490cc8c0af99 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 26 18:47:11 2020 +0200 patch 8.2.1747: result of expand() unexpectedly depends on 'completeslash' Problem: Result of expand() unexpectedly depends on 'completeslash'. Solution: Temporarily reset 'completeslash'. (Yasuhiro Matsumoto, closes #7021)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Sep 2020 19:00:03 +0200
parents 80a000b09cb0
children 58cdc5d7f143
comparison
equal deleted inserted replaced
22396:44cb9b1dc1ed 22397:0a5770061295
361 endfunc 361 endfunc
362 362
363 " Test for insert path completion with completeslash option 363 " Test for insert path completion with completeslash option
364 func Test_ins_completeslash() 364 func Test_ins_completeslash()
365 CheckMSWindows 365 CheckMSWindows
366 366
367 call mkdir('Xdir') 367 call mkdir('Xdir')
368 let orig_shellslash = &shellslash 368 let orig_shellslash = &shellslash
369 set cpt& 369 set cpt&
370 new 370 new
371 371
372 set noshellslash 372 set noshellslash
373 373
374 set completeslash= 374 set completeslash=
375 exe "normal oXd\<C-X>\<C-F>" 375 exe "normal oXd\<C-X>\<C-F>"
376 call assert_equal('Xdir\', getline('.')) 376 call assert_equal('Xdir\', getline('.'))
652 exe "normal oabcxyz(\<C-X>\<C-V>" 652 exe "normal oabcxyz(\<C-X>\<C-V>"
653 call assert_equal('abcxyz(', getline(3)) 653 call assert_equal('abcxyz(', getline(3))
654 close! 654 close!
655 endfunc 655 endfunc
656 656
657 func Test_issue_7021()
658 CheckMSWindows
659
660 let orig_shellslash = &shellslash
661 set noshellslash
662
663 set completeslash=slash
664 call assert_false(expand('~') =~ '/')
665
666 let &shellslash = orig_shellslash
667 set completeslash=
668 endfunc
669
657 " vim: shiftwidth=2 sts=2 expandtab 670 " vim: shiftwidth=2 sts=2 expandtab