tests/test-grep.t
changeset 38421 7fbb5d76c555
parent 38342 b8f45fc27370
child 38540 1e25782a7583
--- a/tests/test-grep.t	Wed Jun 20 09:27:30 2018 -0700
+++ b/tests/test-grep.t	Sun Jun 17 15:52:08 2018 +0530
@@ -281,6 +281,11 @@
   color:2:-:orange
   color:1:+:orange
 
+  $ hg grep --diff orange
+  color:3:+:orange
+  color:2:-:orange
+  color:1:+:orange
+
 test substring match: '^' should only match at the beginning
 
   $ hg grep '^.' --config extensions.color= --color debug
@@ -349,6 +354,10 @@
   color:3:-:red
   color:1:+:red
 
+  $ hg grep --diff red
+  color:3:-:red
+  color:1:+:red
+
 Issue3885: test that changing revision order does not alter the
 revisions printed, just their order.
 
@@ -360,6 +369,14 @@
   color:3:-:red
   color:1:+:red
 
+  $ hg grep --diff red -r "all()"
+  color:1:+:red
+  color:3:-:red
+
+  $ hg grep --diff red -r "reverse(all())"
+  color:3:-:red
+  color:1:+:red
+
   $ cd ..
 
   $ hg init a
@@ -370,6 +387,9 @@
   $ hg grep "MaCam" --all
   binfile.bin:0:+: Binary file matches
 
+  $ hg grep "MaCam" --diff
+  binfile.bin:0:+: Binary file matches
+
   $ cd ..
 
 Test for showing working of allfiles flag