tests/test-revset.t
changeset 33003 f63d111258da
parent 33002 272a44cac57e
child 33074 e999b59d6eb1
--- a/tests/test-revset.t	Sun Jun 18 00:22:41 2017 +0900
+++ b/tests/test-revset.t	Sun Jun 18 00:40:58 2017 +0900
@@ -903,6 +903,29 @@
   6
   5
 
+ (walk 2nd and 3rd ancestors)
+
+  $ log 'reverse(ancestors(7, depth=3, startdepth=2))'
+  5
+  4
+  3
+  2
+
+ (interleaved: '4' would be missing if higher-depth ancestors weren't scanned)
+
+  $ log 'reverse(ancestors(7+8, depth=2, startdepth=2))'
+  5
+  4
+  2
+
+ (note that 'ancestors(x, depth=y, startdepth=z)' does not identical to
+ 'ancestors(x, depth=y) - ancestors(x, depth=z-1)' because a node may have
+ multiple depths)
+
+  $ log 'reverse(ancestors(7+8, depth=2) - ancestors(7+8, depth=1))'
+  5
+  2
+
 test bad arguments passed to ancestors()
 
   $ log 'ancestors(., depth=-1)'