diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:05:33 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2022-10-26 13:41:31 +0800 |
| commit | d40739843cf9a160587032bf381c440079e5a8ce (patch) | |
| tree | 8ad1768ff467a3468c48d74953071b7afcf25ddf /src/nvim/testdir/test_diffmode.vim | |
| parent | b4c250d37b7b53312b734f1dae6d9aed3942c563 (diff) | |
| download | rneovim-d40739843cf9a160587032bf381c440079e5a8ce.tar.gz rneovim-d40739843cf9a160587032bf381c440079e5a8ce.tar.bz2 rneovim-d40739843cf9a160587032bf381c440079e5a8ce.zip | |
vim-patch:8.2.0401: not enough test coverage for evalvars.c
Problem: Not enough test coverage for evalvars.c.
Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5804)
https://github.com/vim/vim/commit/8dfcce3a78ccb520cc9d09081f998091494c50bf
Assert E475 instead of E474 in :redir test because a later patch changed
the error number.
Comment out the test for :echo with a deeply nested container as Nvim
implements :echo very differently.
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 |