Commit d73fa83
tests: fix "old" names in generated patch files
Fixes #223. Very simple reproduction
```
cd diffutils
mkdir a
touch a/alef a/alefn a/alef_ a/alefx a/alefr a/fuzz.file
cargo test
```
=> fail
https://www.gnu.org/software/diffutils/manual/html_node/Multiple-Patches.html
states that the "old" file name has precedence over the "new" filename.
I hit this problem because some other (and unfortunately: unknown for
now) test issue left bogus `a/alef*` file(s) behind in my workspace. I
didn't bother cleaning them up because I assumed some test would keep
recreating them and that cost me a lot of time.
This issue seems to have existed since the very first commit.
Interestingly, there as a previous attempt in 2024 to fix this in commit
a3a372f ! So I was apparently not the only affected. BUT that
fix was immediately reverted by commit ba7cb0a in the same
PR. Admittedly, that fix seemed somewhat off-topic in
#33. So here it is again.1 parent be90f75 commit d73fa83
3 files changed
Lines changed: 31 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | | - | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| 432 | + | |
432 | 433 | | |
433 | 434 | | |
434 | 435 | | |
435 | 436 | | |
436 | | - | |
437 | | - | |
| 437 | + | |
| 438 | + | |
438 | 439 | | |
439 | 440 | | |
440 | 441 | | |
| |||
510 | 511 | | |
511 | 512 | | |
512 | 513 | | |
| 514 | + | |
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
516 | 518 | | |
517 | | - | |
518 | | - | |
| 519 | + | |
| 520 | + | |
519 | 521 | | |
520 | 522 | | |
521 | 523 | | |
| |||
594 | 596 | | |
595 | 597 | | |
596 | 598 | | |
| 599 | + | |
597 | 600 | | |
598 | 601 | | |
599 | 602 | | |
600 | 603 | | |
601 | | - | |
602 | | - | |
| 604 | + | |
| 605 | + | |
603 | 606 | | |
604 | 607 | | |
605 | 608 | | |
| |||
681 | 684 | | |
682 | 685 | | |
683 | 686 | | |
| 687 | + | |
684 | 688 | | |
685 | 689 | | |
686 | 690 | | |
687 | 691 | | |
688 | | - | |
689 | | - | |
| 692 | + | |
| 693 | + | |
690 | 694 | | |
691 | 695 | | |
692 | 696 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | 462 | | |
462 | 463 | | |
463 | | - | |
464 | | - | |
| 464 | + | |
| 465 | + | |
465 | 466 | | |
466 | 467 | | |
467 | 468 | | |
| |||
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
| 576 | + | |
575 | 577 | | |
576 | 578 | | |
577 | 579 | | |
578 | 580 | | |
579 | | - | |
580 | | - | |
| 581 | + | |
| 582 | + | |
581 | 583 | | |
582 | 584 | | |
583 | 585 | | |
| |||
668 | 670 | | |
669 | 671 | | |
670 | 672 | | |
| 673 | + | |
671 | 674 | | |
672 | 675 | | |
673 | 676 | | |
674 | 677 | | |
675 | | - | |
676 | | - | |
| 678 | + | |
| 679 | + | |
677 | 680 | | |
678 | 681 | | |
679 | 682 | | |
| |||
749 | 752 | | |
750 | 753 | | |
751 | 754 | | |
| 755 | + | |
752 | 756 | | |
753 | 757 | | |
754 | 758 | | |
755 | 759 | | |
756 | | - | |
757 | | - | |
| 760 | + | |
| 761 | + | |
758 | 762 | | |
759 | 763 | | |
760 | 764 | | |
| |||
835 | 839 | | |
836 | 840 | | |
837 | 841 | | |
| 842 | + | |
838 | 843 | | |
839 | 844 | | |
840 | 845 | | |
841 | 846 | | |
842 | | - | |
843 | | - | |
| 847 | + | |
| 848 | + | |
844 | 849 | | |
845 | 850 | | |
846 | 851 | | |
| |||
0 commit comments