Mercurial > hg-stable
comparison tests/test-diff-color.t @ 35337:4937db58b663
patch: move part of tabsplitter logic in _inlinediff
It cannot be entirely moved within _inlinediff as long as worddiff is
experimental (when turned off, matches is always an empty dict).
author | Matthieu Laneuville <matthieu.laneuville@octobus.net> |
---|---|
date | Fri, 08 Dec 2017 17:20:11 +0900 |
parents | 6ba79cf34f5e |
children | 82c3762349ac |
comparison
equal
deleted
inserted
replaced
35336:777cb4497d8d | 35337:4937db58b663 |
---|---|
267 $ cat > file1 << EOF | 267 $ cat > file1 << EOF |
268 > this is the first line | 268 > this is the first line |
269 > this is the second line | 269 > this is the second line |
270 > third line starts with space | 270 > third line starts with space |
271 > + starts with a plus sign | 271 > + starts with a plus sign |
272 > this one with one tab | |
273 > now with full two tabs | |
274 > now tabs everywhere, much fun | |
272 > | 275 > |
273 > this line won't change | 276 > this line won't change |
274 > | 277 > |
275 > two lines are going to | 278 > two lines are going to |
276 > be changed into three! | 279 > be changed into three! |
279 > collapse onto one | 282 > collapse onto one |
280 > (to see if it works) | 283 > (to see if it works) |
281 > EOF | 284 > EOF |
282 $ hg add file1 | 285 $ hg add file1 |
283 $ hg ci -m 'commit' | 286 $ hg ci -m 'commit' |
287 | |
284 $ cat > file1 << EOF | 288 $ cat > file1 << EOF |
285 > that is the first paragraph | 289 > that is the first paragraph |
286 > this is the second line | 290 > this is the second line |
287 > third line starts with space | 291 > third line starts with space |
288 > - starts with a minus sign | 292 > - starts with a minus sign |
293 > this one with two tab | |
294 > now with full three tabs | |
295 > now there are tabs everywhere, much fun | |
289 > | 296 > |
290 > this line won't change | 297 > this line won't change |
291 > | 298 > |
292 > two lines are going to | 299 > two lines are going to |
293 > (entirely magically, | 300 > (entirely magically, |
299 > EOF | 306 > EOF |
300 $ hg diff --config experimental.worddiff=False --color=debug | 307 $ hg diff --config experimental.worddiff=False --color=debug |
301 [diff.diffline|diff --git a/file1 b/file1] | 308 [diff.diffline|diff --git a/file1 b/file1] |
302 [diff.file_a|--- a/file1] | 309 [diff.file_a|--- a/file1] |
303 [diff.file_b|+++ b/file1] | 310 [diff.file_b|+++ b/file1] |
304 [diff.hunk|@@ -1,13 +1,14 @@] | 311 [diff.hunk|@@ -1,16 +1,17 @@] |
305 [diff.deleted|-this is the first line] | 312 [diff.deleted|-this is the first line] |
306 [diff.deleted|-this is the second line] | 313 [diff.deleted|-this is the second line] |
307 [diff.deleted|- third line starts with space] | 314 [diff.deleted|- third line starts with space] |
308 [diff.deleted|-+ starts with a plus sign] | 315 [diff.deleted|-+ starts with a plus sign] |
316 [diff.deleted|-][diff.tab| ][diff.deleted|this one with one tab] | |
317 [diff.deleted|-][diff.tab| ][diff.deleted|now with full two tabs] | |
318 [diff.deleted|-][diff.tab| ][diff.deleted|now tabs][diff.tab| ][diff.deleted|everywhere, much fun] | |
309 [diff.inserted|+that is the first paragraph] | 319 [diff.inserted|+that is the first paragraph] |
310 [diff.inserted|+ this is the second line] | 320 [diff.inserted|+ this is the second line] |
311 [diff.inserted|+third line starts with space] | 321 [diff.inserted|+third line starts with space] |
312 [diff.inserted|+- starts with a minus sign] | 322 [diff.inserted|+- starts with a minus sign] |
323 [diff.inserted|+][diff.tab| ][diff.inserted|this one with two tab] | |
324 [diff.inserted|+][diff.tab| ][diff.inserted|now with full three tabs] | |
325 [diff.inserted|+][diff.tab| ][diff.inserted|now there are tabs][diff.tab| ][diff.inserted|everywhere, much fun] | |
313 | 326 |
314 this line won't change | 327 this line won't change |
315 | 328 |
316 two lines are going to | 329 two lines are going to |
317 [diff.deleted|-be changed into three!] | 330 [diff.deleted|-be changed into three!] |
326 [diff.inserted|+collapsed onto one] | 339 [diff.inserted|+collapsed onto one] |
327 $ hg diff --config experimental.worddiff=True --color=debug | 340 $ hg diff --config experimental.worddiff=True --color=debug |
328 [diff.diffline|diff --git a/file1 b/file1] | 341 [diff.diffline|diff --git a/file1 b/file1] |
329 [diff.file_a|--- a/file1] | 342 [diff.file_a|--- a/file1] |
330 [diff.file_b|+++ b/file1] | 343 [diff.file_b|+++ b/file1] |
331 [diff.hunk|@@ -1,13 +1,14 @@] | 344 [diff.hunk|@@ -1,16 +1,17 @@] |
332 [diff.deleted|-this is the ][diff.deleted.highlight|first][diff.deleted| line] | 345 [diff.deleted|-this is the ][diff.deleted.highlight|first][diff.deleted| line] |
333 [diff.deleted|-this is the second line] | 346 [diff.deleted|-this is the second line] |
334 [diff.deleted|-][diff.deleted.highlight| ][diff.deleted|third line starts with space] | 347 [diff.deleted|-][diff.deleted.highlight| ][diff.deleted|third line starts with space] |
335 [diff.deleted|-][diff.deleted.highlight|+][diff.deleted| starts with a ][diff.deleted.highlight|plus][diff.deleted| sign] | 348 [diff.deleted|-][diff.deleted.highlight|+][diff.deleted| starts with a ][diff.deleted.highlight|plus][diff.deleted| sign] |
349 [diff.deleted|-][diff.tab| ][diff.deleted|this one with ][diff.deleted.highlight|one][diff.deleted| tab] | |
350 [diff.deleted|-][diff.tab| ][diff.deleted|now with full ][diff.deleted.highlight|two][diff.deleted| tabs] | |
351 [diff.deleted|-][diff.tab| ][diff.deleted|now tabs][diff.tab| ][diff.deleted|everywhere, much fun] | |
336 [diff.inserted|+that is the first paragraph] | 352 [diff.inserted|+that is the first paragraph] |
337 [diff.inserted|+][diff.inserted.highlight| ][diff.inserted|this is the ][diff.inserted.highlight|second][diff.inserted| line] | 353 [diff.inserted|+][diff.inserted.highlight| ][diff.inserted|this is the ][diff.inserted.highlight|second][diff.inserted| line] |
338 [diff.inserted|+third line starts with space] | 354 [diff.inserted|+third line starts with space] |
339 [diff.inserted|+][diff.inserted.highlight|-][diff.inserted| starts with a ][diff.inserted.highlight|minus][diff.inserted| sign] | 355 [diff.inserted|+][diff.inserted.highlight|-][diff.inserted| starts with a ][diff.inserted.highlight|minus][diff.inserted| sign] |
356 [diff.inserted|+][diff.tab| ][diff.inserted|this one with ][diff.inserted.highlight|two][diff.inserted| tab] | |
357 [diff.inserted|+][diff.tab| ][diff.inserted|now with full ][diff.inserted.highlight|three][diff.inserted| tabs] | |
358 [diff.inserted|+][diff.tab| ][diff.inserted|now][diff.inserted.highlight| there are][diff.inserted| tabs][diff.tab| ][diff.inserted|everywhere, much fun] | |
340 | 359 |
341 this line won't change | 360 this line won't change |
342 | 361 |
343 two lines are going to | 362 two lines are going to |
344 [diff.deleted|-be changed into ][diff.deleted.highlight|three][diff.deleted|!] | 363 [diff.deleted|-be changed into ][diff.deleted.highlight|three][diff.deleted|!] |