Mercurial > hg
comparison tests/test-fix.t @ 42663:4b04244f2d5f
fix: add some new test cases
These cover a couple of behaviors we were testing at Google that weren't
covered here before.
Differential Revision: https://phab.mercurial-scm.org/D6698
author | Danny Hooper <hooper@google.com> |
---|---|
date | Fri, 26 Jul 2019 10:47:06 -0700 |
parents | 2987d015aba4 |
children | 74b4cd091e0d |
comparison
equal
deleted
inserted
replaced
42662:ee86ad6f50fe | 42663:4b04244f2d5f |
---|---|
437 $ cd wholeignoresdiffs | 437 $ cd wholeignoresdiffs |
438 | 438 |
439 $ printf "a\nb\nc\nd\ne\nf\ng\n" > foo.changed | 439 $ printf "a\nb\nc\nd\ne\nf\ng\n" > foo.changed |
440 $ hg commit -Aqm "foo" | 440 $ hg commit -Aqm "foo" |
441 $ printf "zz\na\nc\ndd\nee\nff\nf\ngg\n" > foo.changed | 441 $ printf "zz\na\nc\ndd\nee\nff\nf\ngg\n" > foo.changed |
442 | |
443 $ hg fix --working-dir | |
444 $ cat foo.changed | |
445 ZZ | |
446 a | |
447 c | |
448 DD | |
449 EE | |
450 FF | |
451 f | |
452 GG | |
453 | |
442 $ hg fix --working-dir --whole | 454 $ hg fix --working-dir --whole |
443 $ cat foo.changed | 455 $ cat foo.changed |
444 ZZ | 456 ZZ |
445 A | 457 A |
446 C | 458 C |
521 adding notme.whole | 533 adding notme.whole |
522 $ hg fix --working-dir fixme.whole | 534 $ hg fix --working-dir fixme.whole |
523 $ cat *.whole | 535 $ cat *.whole |
524 FIX ME! | 536 FIX ME! |
525 not me. | 537 not me. |
538 | |
539 $ cd .. | |
540 | |
541 If we try to fix a missing file, we still fix other files. | |
542 | |
543 $ hg init fixmissingfile | |
544 $ cd fixmissingfile | |
545 | |
546 $ printf "fix me!\n" > foo.whole | |
547 $ hg add | |
548 adding foo.whole | |
549 $ hg fix --working-dir foo.whole bar.whole | |
550 bar.whole: $ENOENT$ | |
551 $ cat *.whole | |
552 FIX ME! | |
526 | 553 |
527 $ cd .. | 554 $ cd .. |
528 | 555 |
529 Specifying a directory name should fix all its files and subdirectories. | 556 Specifying a directory name should fix all its files and subdirectories. |
530 | 557 |