aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-09-23 12:04:07 +0800
committerGitHub <noreply@github.com>2024-09-23 12:04:07 +0800
commitbfe0acaea167a5ce18d4c63f65ccd45966203413 (patch)
treea53ce3e5b327e8b65b8892b73648016bd13ae989 /test/old/testdir
parente83ce331da9165ad611b31aef9965fa74abaea14 (diff)
downloadrneovim-bfe0acaea167a5ce18d4c63f65ccd45966203413.tar.gz
rneovim-bfe0acaea167a5ce18d4c63f65ccd45966203413.tar.bz2
rneovim-bfe0acaea167a5ce18d4c63f65ccd45966203413.zip
vim-patch:9.1.0740: incorrect internal diff with empty file (#30471)
Problem: incorrect internal diff with an empty file Solution: Set pointer to NULL, instead of using an empty line file (Yukihiro Nakadaira) When using internal diff, empty file is read as one empty line file. So result differs from external diff. closes: vim/vim#15719 https://github.com/vim/vim/commit/f1694b439bb175d956b49da620f1253462ec507b Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_diffmode.vim10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim
index 31d66ebc4a..84cb7eb376 100644
--- a/test/old/testdir/test_diffmode.vim
+++ b/test/old/testdir/test_diffmode.vim
@@ -997,9 +997,17 @@ func Test_diff_screen()
call WriteDiffFiles(buf, ['a ', 'x', 'cd', 'ef', 'xx xx', 'foo', 'bar'], ['a', 'x', 'c d', ' ef', 'xx xx', 'foo', '', 'bar'])
call VerifyInternal(buf, 'Test_diff_19', " diffopt+=iwhiteeol")
- " Test 19: test diffopt+=iwhiteall
+ " Test 20: test diffopt+=iwhiteall
call VerifyInternal(buf, 'Test_diff_20', " diffopt+=iwhiteall")
+ " Test 21: Delete all lines
+ call WriteDiffFiles(buf, [0], [])
+ call VerifyBoth(buf, "Test_diff_21", "")
+
+ " Test 22: Add line to empty file
+ call WriteDiffFiles(buf, [], [0])
+ call VerifyBoth(buf, "Test_diff_22", "")
+
" clean up
call StopVimInTerminal(buf)
call delete('Xdifile1')