changeset 44863:3db660b8eba6

grep: add test coverage of behavior on symlinks Differential Revision: https://phab.mercurial-scm.org/D8580
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Mon, 25 May 2020 17:29:38 -0400
parents 5fe8f02ced6d
children 06105aa8bc0e
files tests/test-grep.t
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-grep.t	Fri May 22 22:20:37 2020 +0800
+++ b/tests/test-grep.t	Mon May 25 17:29:38 2020 -0400
@@ -666,7 +666,15 @@
   new:modified
   um:unmod
 
- which can be overridden by -rREV
+#if symlink
+Grepping a symlink greps its destination
+
+  $ rm -f added; ln -s symlink-added added
+  $ hg grep '' | grep added
+  added:symlink-added
+#endif
+
+But we can search files from some other revision with -rREV
 
   $ hg grep -r. mod
   um:1:unmod