tests/test-revset.t
branchstable
changeset 25094 8b99e9a8db05
parent 24904 b5c227f3e461
child 25102 bb2f543b48b5
child 25265 e16456831516
--- a/tests/test-revset.t	Sun May 10 10:57:24 2015 -0400
+++ b/tests/test-revset.t	Fri May 15 22:32:31 2015 +0900
@@ -533,6 +533,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'