From b0e006ab1204e9b68e3eb0fcc48b1f9dbd96ad98 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 24 Feb 2005 12:50:09 +0000 Subject: [PATCH] Fixed help to show the full command. --- plugins/Misc/plugin.py | 1 + plugins/Misc/test.py | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/Misc/plugin.py b/plugins/Misc/plugin.py index 90479d42a..abbb769ca 100644 --- a/plugins/Misc/plugin.py +++ b/plugins/Misc/plugin.py @@ -168,6 +168,7 @@ class Misc(callbacks.Plugin): This command gives a useful description of what does. is only necessary if the command is in more than one plugin. """ + command = map(callbacks.canonicalName, command) (maxL, cbs) = irc.findCallbacksForArgs(command) if maxL == command: if len(cbs) > 1: diff --git a/plugins/Misc/test.py b/plugins/Misc/test.py index 399298c15..dcc1c95f8 100644 --- a/plugins/Misc/test.py +++ b/plugins/Misc/test.py @@ -31,7 +31,8 @@ from supybot.test import * class MiscTestCase(ChannelPluginTestCase): # plugins = ('Misc', 'Utilities', 'Gameknot', 'Anonymous', 'Dict', 'User') - plugins = ('Misc', 'Utilities', 'Anonymous', 'Dict', 'User', 'String') + plugins = ('Misc', 'Utilities', 'Anonymous', + 'Channel', 'Dict', 'User', 'String') def testReplyWhenNotCommand(self): try: original = str(conf.supybot.reply.whenNotCommand) @@ -71,6 +72,11 @@ class MiscTestCase(ChannelPluginTestCase): #self.assertRegexp('help misc help', r'^\(\x02misc help') self.assertError('help nonExistentCommand') + def testHelpIncludeFullCommandName(self): + self.assertHelp('help channel capability add') + m = self.getMsg('help channel capability add') + self.failUnless('channel capability add' in m.args[1]) + def testHelpDoesAmbiguityWithDefaultPlugins(self): m = self.getMsg('help list') # Misc.list and User.list. self.failIf(m.args[1].startswith('Error'))