changeset 15099:b1f49efeab65

test: test for options duplicate with global options issue2995 should not happen anymore
author Simon Heimberg <simohe@besonet.ch>
date Wed, 14 Sep 2011 17:06:33 +0200
parents edf7ae547b0e
children a051f8a6a7cc
files tests/test-duplicateoptions.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-duplicateoptions.py	Wed Sep 14 14:37:10 2011 -0500
+++ b/tests/test-duplicateoptions.py	Wed 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):