##// END OF EJS Templates
grep: improve test coverage...
Valentin Gatien-Baron -
r45367:7e7080ab default
parent child Browse files
Show More
@@ -645,18 +645,24 b' Test for showing working of allfiles fla'
645 645 $ hg init sng
646 646 $ cd sng
647 647 $ echo "unmod" >> um
648 $ hg ci -A -m "adds unmod to um"
649 adding um
648 $ echo old > old
649 $ hg ci -q -A -m "adds unmod to um"
650 650 $ echo "something else" >> new
651 651 $ hg ci -A -m "second commit"
652 652 adding new
653 653 $ hg grep -r "." "unmod"
654 654 um:1:unmod
655 655
656 Working directory is searched by default
656 Existing tracked files in the working directory are searched by default
657 657
658 658 $ echo modified >> new
659 $ hg grep mod
659 $ echo 'added' > added; hg add added
660 $ echo 'added, missing' > added-missing; hg add added-missing; rm added-missing
661 $ echo 'untracked' > untracked
662 $ hg rm old
663 $ hg grep '[^Z]'
664 added:added
665 new:something else
660 666 new:modified
661 667 um:unmod
662 668
@@ -670,17 +676,6 b' Working directory is searched by default'
670 676
671 677 $ cd ..
672 678
673 Fix_Wdir(): test that passing wdir() t -r flag does greps on the
674 files modified in the working directory
675
676 $ cd a
677 $ echo "abracadara" >> a
678 $ hg add a
679 $ hg grep -r "wdir()" "abra"
680 a:2147483647:abracadara
681
682 $ cd ..
683
684 679 Change Default of grep by ui.tweakdefaults, that is, the files not in current
685 680 working directory should not be grepp-ed on
686 681
General Comments 0
You need to be logged in to leave comments. Login now