[PATCH] test: test for options duplicate with global options
Simon Heimberg
simohe at besonet.ch
Wed Sep 14 10:07:04 CDT 2011
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1316012793 -7200
# Node ID cc7cd6cc7669b04b7f6478714c2893af7ae2a07d
# Parent 7a558a75eea73b63d017ba9af1f810d352a35560
test: test for options duplicate with global options
issue2995 should not happen anymore
diff -r 7a558a75eea7 -r cc7cd6cc7669 tests/test-duplicateoptions.py
--- a/tests/test-duplicateoptions.py Sam Jul 23 06:18:18 2011 +0200
+++ b/tests/test-duplicateoptions.py Mit Sep 14 17:06:33 2011 +0200
@@ -19,9 +19,15 @@
u = ui.ui()
extensions.loadall(u)
+globalshort = set()
+globallong = set()
+for option in commands.globalopts:
+ option[0] and globalshort.add(option[0])
+ option[1] and globallong.add(option[1])
+
for cmd, entry in commands.table.iteritems():
- seenshort = set()
- seenlong = set()
+ seenshort = globalshort.copy()
+ seenlong = globallong.copy()
for option in entry[1]:
if (option[0] and option[0] in seenshort) or \
(option[1] and option[1] in seenlong):
More information about the Mercurial-devel
mailing list