tests/test-revset.t
changeset 29791 531e85eec23c
parent 29781 9c51a5de76db
parent 29661 5004ef47f437
child 29909 371c2a39eead
--- a/tests/test-revset.t	Sat Aug 13 04:21:42 2016 +0530
+++ b/tests/test-revset.t	Mon Aug 15 12:26:02 2016 -0400
@@ -470,6 +470,25 @@
   hg: parse error: can't use a key-value pair in this context
   [255]
 
+ right-hand side should be optimized recursively
+
+  $ try --optimize 'foo=(not public())'
+  (keyvalue
+    ('symbol', 'foo')
+    (group
+      (not
+        (func
+          ('symbol', 'public')
+          None))))
+  * optimized:
+  (keyvalue
+    ('symbol', 'foo')
+    (func
+      ('symbol', '_notpublic')
+      None))
+  hg: parse error: can't use a key-value pair in this context
+  [255]
+
 Test that symbols only get parsed as functions if there's an opening
 parenthesis.
 
@@ -1801,6 +1820,11 @@
   hg: parse error: topo.firstbranch can only be used when using the topo sort key
   [255]
 
+topo.firstbranch should accept any kind of expressions:
+
+  $ hg log -r 'sort(0, topo, topo.firstbranch=(book1))'
+  0 b12  m111 u112 111 10800
+
   $ cd ..
   $ cd repo