Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 19689:da98d2ed8dc5 v8.2.0401
patch 8.2.0401: not enough test coverage for evalvars.c
Commit: https://github.com/vim/vim/commit/8dfcce3a78ccb520cc9d09081f998091494c50bf
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 18 19:32:26 2020 +0100
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 https://github.com/vim/vim/issues/5804)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 18 Mar 2020 19:45:04 +0100 |
parents | 0883a37ccf84 |
children | c087099e9163 |
comparison
equal
deleted
inserted
replaced
19688:8d01c76e0bc7 | 19689:da98d2ed8dc5 |
---|---|
1063 diffupdate | 1063 diffupdate |
1064 call assert_equal([2, 3], [line("'["), line("']")]) | 1064 call assert_equal([2, 3], [line("'["), line("']")]) |
1065 bwipe! | 1065 bwipe! |
1066 bwipe! | 1066 bwipe! |
1067 endfunc | 1067 endfunc |
1068 | |
1069 " Test for 'patchexpr' | |
1070 func Test_patchexpr() | |
1071 let g:patch_args = [] | |
1072 func TPatch() | |
1073 call add(g:patch_args, readfile(v:fname_in)) | |
1074 call add(g:patch_args, readfile(v:fname_diff)) | |
1075 call writefile(['output file'], v:fname_out) | |
1076 endfunc | |
1077 set patchexpr=TPatch() | |
1078 | |
1079 call writefile(['input file'], 'Xinput') | |
1080 call writefile(['diff file'], 'Xdiff') | |
1081 %bwipe! | |
1082 edit Xinput | |
1083 diffpatch Xdiff | |
1084 call assert_equal('output file', getline(1)) | |
1085 call assert_equal('Xinput.new', bufname()) | |
1086 call assert_equal(2, winnr('$')) | |
1087 call assert_true(&diff) | |
1088 | |
1089 call delete('Xinput') | |
1090 call delete('Xdiff') | |
1091 set patchexpr& | |
1092 delfunc TPatch | |
1093 %bwipe! | |
1094 endfunc | |
1095 | |
1096 " vim: shiftwidth=2 sts=2 expandtab |