tests/test-revset.t
changeset 25102 bb2f543b48b5
parent 25024 263bbed1833c
parent 25094 8b99e9a8db05
child 25105 2f34746c27df
--- a/tests/test-revset.t	Tue Apr 14 12:53:48 2015 -0700
+++ b/tests/test-revset.t	Fri May 15 11:52:09 2015 -0500
@@ -593,6 +593,29 @@
   8
   9
 
+Test opreand of '%' is optimized recursively (issue4670)
+
+  $ try --optimize '8:9-8%'
+  (onlypost
+    (minus
+      (range
+        ('symbol', '8')
+        ('symbol', '9'))
+      ('symbol', '8')))
+  * optimized:
+  (func
+    ('symbol', 'only')
+    (and
+      (range
+        ('symbol', '8')
+        ('symbol', '9'))
+      (not
+        ('symbol', '8'))))
+  * set:
+  <baseset+ [8, 9]>
+  8
+  9
+
 Test the order of operations
 
   $ log '7 + 9%5 + 2'