This commit is contained in:
Jeremy Fincher 2003-12-09 21:32:55 +00:00
parent b4ffe24b84
commit a6099943b4
2 changed files with 5 additions and 2 deletions

View File

@ -91,7 +91,7 @@ class Misc(callbacks.Privmsg):
commands = []
for s in dir(cb):
if cb.isCommand(s) and \
s != name and \
(s != name or cb._original) and \
s == callbacks.canonicalName(s):
method = getattr(cb, s)
if hasattr(method, '__doc__') and method.__doc__:

View File

@ -32,7 +32,7 @@
from testsupport import *
class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
plugins = ('Misc', 'Utilities', 'Gameknot', 'Ctcp')
plugins = ('Misc', 'Utilities', 'Gameknot', 'Ctcp', 'Dict')
def testAction(self):
self.assertAction('action moos', 'moos')
self.assertAction('action','')
@ -91,6 +91,9 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
def testListNoIncludeDispatcher(self):
self.assertNotRegexp('list Misc', 'misc')
def testListIncludesDispatcherIfThereIsAnOriginalCommand(self):
self.assertRegexp('list Dict', r'\bdict\b')
def testVersion(self):
self.assertNotError('version')