aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_diffmode.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-13 09:08:02 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-11-13 09:26:59 +0800
commitb9cffe40fa8e23551e61e129674643ee42da2caf (patch)
tree86f0ae4819256c375f855bf6d42a6f7135f73ed2 /test/old/testdir/test_diffmode.vim
parent5c69f8569ad2013b1d97afd2fbefd6bda8e8379f (diff)
downloadrneovim-b9cffe40fa8e23551e61e129674643ee42da2caf.tar.gz
rneovim-b9cffe40fa8e23551e61e129674643ee42da2caf.tar.bz2
rneovim-b9cffe40fa8e23551e61e129674643ee42da2caf.zip
vim-patch:9.0.0336: tests are flaky because of using a common file name
Problem: Tests are flaky because of using a common file name. Solution: Rename files and directories to be more unique. https://github.com/vim/vim/commit/61abe7d8f827ec31f098e8abcdf58846b956ef16 Cherry-pick Test_custom_complete_autoload() from patch 8.2.4584. Cherry-pick test_delete.vim & test_edit.vim changes from patch 9.0.0323. Cherry-pick test_edit.vim changes from patch 8.2.3637. Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_diffmode.vim')
-rw-r--r--test/old/testdir/test_diffmode.vim21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim
index a06411883c..87336c4e08 100644
--- a/test/old/testdir/test_diffmode.vim
+++ b/test/old/testdir/test_diffmode.vim
@@ -822,12 +822,13 @@ func Test_diff_lastline()
endfunc
func WriteDiffFiles(buf, list1, list2)
- call writefile(a:list1, 'Xfile1')
- call writefile(a:list2, 'Xfile2')
+ call writefile(a:list1, 'Xdifile1')
+ call writefile(a:list2, 'Xdifile2')
if a:buf
call term_sendkeys(a:buf, ":checktime\<CR>")
endif
endfunc
+
" Verify a screendump with both the internal and external diff.
func VerifyBoth(buf, dumpfile, extra)
" trailing : for leaving the cursor on the command line
@@ -877,12 +878,12 @@ func Test_diff_screen()
call writefile(lines, 'XdiffSetup')
" clean up already existing swap files, just in case
- call delete('.Xfile1.swp')
- call delete('.Xfile2.swp')
+ call delete('.Xdifile1.swp')
+ call delete('.Xdifile2.swp')
" Test 1: Add a line in beginning of file 2
call WriteDiffFiles(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
- let buf = RunVimInTerminal('-d -S XdiffSetup Xfile1 Xfile2', {})
+ let buf = RunVimInTerminal('-d -S XdiffSetup Xdifile1 Xdifile2', {})
" Set autoread mode, so that Vim won't complain once we re-write the test
" files
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
@@ -1000,8 +1001,8 @@ func Test_diff_screen()
" clean up
call StopVimInTerminal(buf)
- call delete('Xfile1')
- call delete('Xfile2')
+ call delete('Xdifile1')
+ call delete('Xdifile2')
call delete('XdiffSetup')
endfunc
@@ -1495,9 +1496,9 @@ endfunc
" for the issue fixed by patch 6.2.317)
func Test_diff_foldinvert()
%bw!
- edit Xfile1
- new Xfile2
- new Xfile3
+ edit Xdoffile1
+ new Xdoffile2
+ new Xdoffile3
windo diffthis
" open a non-diff window
botright new