mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added RFE #827538 and fixed the help test.
This commit is contained in:
parent
42795d34d0
commit
a666eddd16
@ -346,8 +346,8 @@ class Misc(callbacks.Privmsg):
|
||||
if option == 'fancy':
|
||||
fancy = True
|
||||
elif option == 'from':
|
||||
predicates.append(lambda m, arg=arg: ircutils.nickEqual(m.nick,
|
||||
arg))
|
||||
predicates.append(lambda m, arg=arg: \
|
||||
ircutils.hostmaskPatternEqual(arg, m.nick))
|
||||
elif option == 'in' or option == 'to':
|
||||
if not ircutils.isChannel(arg):
|
||||
irc.error(msg, 'Argument to --%s must be a channel.' % arg)
|
||||
|
@ -69,7 +69,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
finally:
|
||||
conf.prefixChars = original
|
||||
self.assertHelp('help list')
|
||||
self.assertRegexp('help help', r'^\x02\(help')
|
||||
self.assertRegexp('help help', r'^\(\x02help')
|
||||
self.assertRegexp('help misc help', r'^\(\x02misc help')
|
||||
self.assertError('help morehelp')
|
||||
|
||||
def testList(self):
|
||||
@ -120,6 +121,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
|
||||
self.assertResponse('last --from %s' % self.nick.upper(),
|
||||
'@last --regexp m/bar/')
|
||||
self.assertResponse('last --from %s*' % self.nick[0],
|
||||
'@last --from %s' % self.nick.upper())
|
||||
|
||||
def testMore(self):
|
||||
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
||||
|
Loading…
Reference in New Issue
Block a user