Mercurial > vim
comparison src/testdir/test_diffmode.vim @ 26815:421d082c8f09 v8.2.3936
patch 8.2.3936: no proper test for maintaining change mark in diff mode
Commit: https://github.com/vim/vim/commit/ccc1644f95e7833c23fa0d440e42293c1622fdcb
Author: Sean Dewar <seandewar@users.noreply.github.com>
Date: Wed Dec 29 16:44:48 2021 +0000
patch 8.2.3936: no proper test for maintaining change mark in diff mode
Problem: No proper test for maintaining change mark in diff mode.
Solution: Run the test with internal and external diff. (Sean Dewar,
closes #9424)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Dec 2021 17:45:02 +0100 |
parents | 83a99f08d1e8 |
children | 391eb1c30344 |
comparison
equal
deleted
inserted
replaced
26814:523455824b29 | 26815:421d082c8f09 |
---|---|
1187 set diffopt& | 1187 set diffopt& |
1188 bwipe! | 1188 bwipe! |
1189 endfunc | 1189 endfunc |
1190 | 1190 |
1191 func Test_diff_maintains_change_mark() | 1191 func Test_diff_maintains_change_mark() |
1192 enew! | 1192 func DiffMaintainsChangeMark() |
1193 call setline(1, ['a', 'b', 'c', 'd']) | 1193 enew! |
1194 diffthis | 1194 call setline(1, ['a', 'b', 'c', 'd']) |
1195 new | 1195 diffthis |
1196 call setline(1, ['a', 'b', 'c', 'e']) | 1196 new |
1197 " Set '[ and '] marks | 1197 call setline(1, ['a', 'b', 'c', 'e']) |
1198 2,3yank | 1198 " Set '[ and '] marks |
1199 call assert_equal([2, 3], [line("'["), line("']")]) | 1199 2,3yank |
1200 " Verify they aren't affected by the implicit diff | 1200 call assert_equal([2, 3], [line("'["), line("']")]) |
1201 diffthis | 1201 " Verify they aren't affected by the implicit diff |
1202 call assert_equal([2, 3], [line("'["), line("']")]) | 1202 diffthis |
1203 " Verify they aren't affected by an explicit diff | 1203 call assert_equal([2, 3], [line("'["), line("']")]) |
1204 diffupdate | 1204 " Verify they aren't affected by an explicit diff |
1205 call assert_equal([2, 3], [line("'["), line("']")]) | 1205 diffupdate |
1206 bwipe! | 1206 call assert_equal([2, 3], [line("'["), line("']")]) |
1207 bwipe! | 1207 bwipe! |
1208 bwipe! | |
1209 endfunc | |
1210 | |
1211 set diffopt-=internal | |
1212 call DiffMaintainsChangeMark() | |
1213 set diffopt+=internal | |
1214 call DiffMaintainsChangeMark() | |
1215 set diffopt& | |
1208 endfunc | 1216 endfunc |
1209 | 1217 |
1210 " Test for 'patchexpr' | 1218 " Test for 'patchexpr' |
1211 func Test_patchexpr() | 1219 func Test_patchexpr() |
1212 let g:patch_args = [] | 1220 let g:patch_args = [] |