diff tests/test-revset.t @ 25704:70a2082f855a

revset: add parsing rule for key=value pair It will be used as an keyword argument. Note that our "=" operator is left-associative. In general, the assignment operator is right-associative, but we don't care because it isn't allowed to chain "=" operations.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 27 Jun 2015 17:05:28 +0900
parents 015c0d1087a3
children b7f53c474e2c
line wrap: on
line diff
--- a/tests/test-revset.t	Sun Jun 28 12:46:34 2015 -0700
+++ b/tests/test-revset.t	Sat Jun 27 17:05:28 2015 +0900
@@ -322,6 +322,17 @@
   4
   $ hg book -d date
 
+keyword arguments
+
+  $ try 'foo=bar|baz'
+  (keyvalue
+    ('symbol', 'foo')
+    (or
+      ('symbol', 'bar')
+      ('symbol', 'baz')))
+  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.