mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Fixed help to show the full command.
This commit is contained in:
parent
b272bd7752
commit
b0e006ab12
@ -168,6 +168,7 @@ class Misc(callbacks.Plugin):
|
||||
This command gives a useful description of what <command> does.
|
||||
<plugin> 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:
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user