changeset 28566:34f798bec3dc

tests: add test for "log -r wdir() -p" (issue4871) The issue has been fixed by 93bcc73df8d5, "cmdutil.changeset_printer: pass context into showpatch()". This patch adds test to prevent future regression.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 13 Mar 2016 23:27:27 +0900
parents bfc7f20c76c7
children ca52512ac709
files tests/test-log.t
diffstat 1 files changed, 38 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-log.t	Sun Mar 13 23:21:45 2016 +0900
+++ b/tests/test-log.t	Sun Mar 13 23:27:27 2016 +0900
@@ -1788,6 +1788,14 @@
   date:        [A-Za-z0-9:+ ]+ (re)
   extra:       branch=default
   
+  $ hg log -r 'wdir()' -p --stat
+  changeset:   2147483647:ffffffffffff
+  parent:      0:65624cd9070a
+  user:        test
+  date:        [A-Za-z0-9:+ ]+ (re)
+  
+  
+  
 
 dirty:
 
@@ -1821,6 +1829,36 @@
   files-:      .d6/f1
   extra:       branch=default
   
+  $ hg log -r 'wdir()' -p --stat --git
+  changeset:   2147483647:ffffffffffff
+  parent:      0:65624cd9070a
+  user:        test
+  date:        [A-Za-z0-9:+ ]+ (re)
+  
+   .d6/f1 |  1 -
+   d1/f1  |  1 +
+   d1/f2  |  1 +
+   3 files changed, 2 insertions(+), 1 deletions(-)
+  
+  diff --git a/.d6/f1 b/.d6/f1
+  deleted file mode 100644
+  --- a/.d6/f1
+  +++ /dev/null
+  @@ -1,1 +0,0 @@
+  -1
+  diff --git a/d1/f1 b/d1/f1
+  --- a/d1/f1
+  +++ b/d1/f1
+  @@ -1,1 +1,2 @@
+   1
+  +2
+  diff --git a/d1/f2 b/d1/f2
+  new file mode 100644
+  --- /dev/null
+  +++ b/d1/f2
+  @@ -0,0 +1,1 @@
+  +2
+  
   $ hg log -r 'wdir()' -Tjson
   [
    {