tests/test-commandserver.t
branchstable
changeset 35170 c9740b69b9b7
parent 34942 2a774cae3a03
child 35280 8e72f9152c4d
--- a/tests/test-commandserver.t	Thu Nov 23 22:04:53 2017 +0900
+++ b/tests/test-commandserver.t	Thu Nov 23 22:17:03 2017 +0900
@@ -137,6 +137,20 @@
   summary:     1
   
 
+check strict parsing of early options:
+
+  >>> import os
+  >>> from hgclient import check, readchannel, runcommand
+  >>> os.environ['HGPLAIN'] = '+strictflags'
+  >>> @check
+  ... def cwd(server):
+  ...     readchannel(server)
+  ...     runcommand(server, ['log', '-b', '--config=alias.log=!echo pwned',
+  ...                         'default'])
+  *** runcommand log -b --config=alias.log=!echo pwned default
+  abort: unknown revision '--config=alias.log=!echo pwned'!
+   [255]
+
 check that "histedit --commands=-" can read rules from the input channel:
 
   >>> import cStringIO