diff tests/test-revset.t @ 28690:b56bf98c8afb

revset: drop redundant check for unknown alias arguments Since _parsealiasdefn() rejects unknown alias arguments, _checkaliasarg() is unnecessary. New test is added to make sure unknown '$n' symbols are rejected.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 Feb 2016 20:27:08 +0900
parents a14732e08fec
children 87b89dca669d
line wrap: on
line diff
--- a/tests/test-revset.t	Sun Feb 14 19:48:33 2016 +0900
+++ b/tests/test-revset.t	Sun Feb 14 20:27:08 2016 +0900
@@ -1820,6 +1820,15 @@
     <spanset+ 0:9>>
   0
 
+test unknown reference:
+
+  $ try "unknownref(0)" --config 'revsetalias.unknownref($1)=$1:$2'
+  (func
+    ('symbol', 'unknownref')
+    ('symbol', '0'))
+  abort: failed to parse the definition of revset alias "unknownref": '$' not for alias arguments
+  [255]
+
   $ hg debugrevspec --debug --config revsetalias.anotherbadone='branch(' "tip"
   ('symbol', 'tip')
   warning: failed to parse the definition of revset alias "anotherbadone": at 7: not a prefix: end