comparison src/testdir/test_ins_complete.vim @ 29970:d891115c0aea v9.0.0323

patch 9.0.0323: using common name in tests leads to flaky tests Commit: https://github.com/vim/vim/commit/3b0d70f4ff436cb144683dafd956e8a3ee485a90 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 29 22:31:20 2022 +0100 patch 9.0.0323: using common name in tests leads to flaky tests Problem: Using common name in tests leads to flaky tests. Solution: Rename files and directories to be more specific.
author Bram Moolenaar <Bram@vim.org>
date Mon, 29 Aug 2022 23:45:04 +0200
parents d413dccd4f8a
children aafac1ae89c7
comparison
equal deleted inserted replaced
29969:5f2d38cacd6c 29970:d891115c0aea
7 " Test for insert expansion 7 " Test for insert expansion
8 func Test_ins_complete() 8 func Test_ins_complete()
9 edit test_ins_complete.vim 9 edit test_ins_complete.vim
10 " The files in the current directory interferes with the files 10 " The files in the current directory interferes with the files
11 " used by this test. So use a separate directory for the test. 11 " used by this test. So use a separate directory for the test.
12 call mkdir('Xdir') 12 call mkdir('Xcpldir')
13 cd Xdir 13 cd Xcpldir
14 14
15 set ff=unix 15 set ff=unix
16 call writefile(["test11\t36Gepeto\t/Tag/", 16 call writefile(["test11\t36Gepeto\t/Tag/",
17 \ "asd\ttest11file\t36G", 17 \ "asd\ttest11file\t36G",
18 \ "Makefile\tto\trun"], 'Xtestfile') 18 \ "Makefile\tto\trun"], 'Xtestfile')
103 call delete('Xtest11.one') 103 call delete('Xtest11.one')
104 call delete('Xtest11.two') 104 call delete('Xtest11.two')
105 call delete('Xtestdata') 105 call delete('Xtestdata')
106 set cpt& cot& def& tags& tagbsearch& hidden& 106 set cpt& cot& def& tags& tagbsearch& hidden&
107 cd .. 107 cd ..
108 call delete('Xdir', 'rf') 108 call delete('Xcpldir', 'rf')
109 endfunc 109 endfunc
110 110
111 func Test_ins_complete_invalid_byte() 111 func Test_ins_complete_invalid_byte()
112 if has('unix') && executable('base64') 112 if has('unix') && executable('base64')
113 " this weird command was causing an illegal memory access 113 " this weird command was causing an illegal memory access
431 431
432 " Test for insert path completion with completeslash option 432 " Test for insert path completion with completeslash option
433 func Test_ins_completeslash() 433 func Test_ins_completeslash()
434 CheckMSWindows 434 CheckMSWindows
435 435
436 call mkdir('Xdir') 436 call mkdir('Xcpldir')
437 let orig_shellslash = &shellslash 437 let orig_shellslash = &shellslash
438 set cpt& 438 set cpt&
439 new 439 new
440 440
441 set noshellslash 441 set noshellslash
442 442
443 set completeslash= 443 set completeslash=
444 exe "normal oXd\<C-X>\<C-F>" 444 exe "normal oXd\<C-X>\<C-F>"
445 call assert_equal('Xdir\', getline('.')) 445 call assert_equal('Xcpldir\', getline('.'))
446 446
447 set completeslash=backslash 447 set completeslash=backslash
448 exe "normal oXd\<C-X>\<C-F>" 448 exe "normal oXd\<C-X>\<C-F>"
449 call assert_equal('Xdir\', getline('.')) 449 call assert_equal('Xcpldir\', getline('.'))
450 450
451 set completeslash=slash 451 set completeslash=slash
452 exe "normal oXd\<C-X>\<C-F>" 452 exe "normal oXd\<C-X>\<C-F>"
453 call assert_equal('Xdir/', getline('.')) 453 call assert_equal('Xcpldir/', getline('.'))
454 454
455 set shellslash 455 set shellslash
456 456
457 set completeslash= 457 set completeslash=
458 exe "normal oXd\<C-X>\<C-F>" 458 exe "normal oXd\<C-X>\<C-F>"
459 call assert_equal('Xdir/', getline('.')) 459 call assert_equal('Xcpldir/', getline('.'))
460 460
461 set completeslash=backslash 461 set completeslash=backslash
462 exe "normal oXd\<C-X>\<C-F>" 462 exe "normal oXd\<C-X>\<C-F>"
463 call assert_equal('Xdir\', getline('.')) 463 call assert_equal('Xcpldir\', getline('.'))
464 464
465 set completeslash=slash 465 set completeslash=slash
466 exe "normal oXd\<C-X>\<C-F>" 466 exe "normal oXd\<C-X>\<C-F>"
467 call assert_equal('Xdir/', getline('.')) 467 call assert_equal('Xcpldir/', getline('.'))
468 %bw! 468 %bw!
469 call delete('Xdir', 'rf') 469 call delete('Xcpldir', 'rf')
470 470
471 set noshellslash 471 set noshellslash
472 set completeslash=slash 472 set completeslash=slash
473 call assert_true(stridx(globpath(&rtp, 'syntax/*.vim', 1, 1)[0], '\') != -1) 473 call assert_true(stridx(globpath(&rtp, 'syntax/*.vim', 1, 1)[0], '\') != -1)
474 474