diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 14:38:26 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-26 14:38:26 +0800 |
| commit | c00844aee4d9b607073ff123dfe2e872c9b84954 (patch) | |
| tree | 837c0973319b8d168db9ccd96d6ae113d29287e7 /src/nvim/testdir/test_diffmode.vim | |
| parent | ec33edc7b7027b809ac0b496344367a451e3974a (diff) | |
| parent | 7b39ce36a4599539cd5cb07dad6bd980d30a3180 (diff) | |
| download | rneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.tar.gz rneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.tar.bz2 rneovim-c00844aee4d9b607073ff123dfe2e872c9b84954.zip | |
Merge pull request #20806 from zeertzjq/vim-8.2.0401
vim-patch:7.4.{1081,1097},8.2.{0401,0418}: eval tests
Diffstat (limited to 'src/nvim/testdir/test_diffmode.vim')
| -rw-r--r-- | src/nvim/testdir/test_diffmode.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_diffmode.vim b/src/nvim/testdir/test_diffmode.vim index 1cb71664bd..831efdbfc2 100644 --- a/src/nvim/testdir/test_diffmode.vim +++ b/src/nvim/testdir/test_diffmode.vim @@ -1198,6 +1198,33 @@ func Test_diff_maintains_change_mark() delfunc DiffMaintainsChangeMark endfunc +" Test for 'patchexpr' +func Test_patchexpr() + let g:patch_args = [] + func TPatch() + call add(g:patch_args, readfile(v:fname_in)) + call add(g:patch_args, readfile(v:fname_diff)) + call writefile(['output file'], v:fname_out) + endfunc + set patchexpr=TPatch() + + call writefile(['input file'], 'Xinput') + call writefile(['diff file'], 'Xdiff') + %bwipe! + edit Xinput + diffpatch Xdiff + call assert_equal('output file', getline(1)) + call assert_equal('Xinput.new', bufname()) + call assert_equal(2, winnr('$')) + call assert_true(&diff) + + call delete('Xinput') + call delete('Xdiff') + set patchexpr& + delfunc TPatch + %bwipe! +endfunc + func Test_diff_rnu() CheckScreendump |