tests/test-grep.t
changeset 29854 b842b1adfea2
parent 24064 c260887cdbcd
child 29858 33461139c31c
--- a/tests/test-grep.t	Tue Jul 05 09:37:07 2016 +0200
+++ b/tests/test-grep.t	Thu Aug 18 14:03:25 2016 +0900
@@ -111,6 +111,12 @@
   color:2:-:orange
   color:1:+:orange
 
+test substring match: '^' should only match at the beginning
+
+  $ hg grep '^.' --config extensions.color= --color debug
+  [grep.filename|color][grep.sep|:][grep.rev|3][grep.sep|:][grep.match|b]lack
+  [grep.filename|color][grep.sep|:][grep.rev|3][grep.sep|:][grep.match|o]range
+  [grep.filename|color][grep.sep|:][grep.rev|3][grep.sep|:][grep.match|b]lue
 
 match in last "line" without newline