mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-13 06:09: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':
|
if option == 'fancy':
|
||||||
fancy = True
|
fancy = True
|
||||||
elif option == 'from':
|
elif option == 'from':
|
||||||
predicates.append(lambda m, arg=arg: ircutils.nickEqual(m.nick,
|
predicates.append(lambda m, arg=arg: \
|
||||||
arg))
|
ircutils.hostmaskPatternEqual(arg, m.nick))
|
||||||
elif option == 'in' or option == 'to':
|
elif option == 'in' or option == 'to':
|
||||||
if not ircutils.isChannel(arg):
|
if not ircutils.isChannel(arg):
|
||||||
irc.error(msg, 'Argument to --%s must be a channel.' % arg)
|
irc.error(msg, 'Argument to --%s must be a channel.' % arg)
|
||||||
|
@ -69,7 +69,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
finally:
|
finally:
|
||||||
conf.prefixChars = original
|
conf.prefixChars = original
|
||||||
self.assertHelp('help list')
|
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')
|
self.assertError('help morehelp')
|
||||||
|
|
||||||
def testList(self):
|
def testList(self):
|
||||||
@ -120,6 +121,8 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
|
self.assertResponse('last --regexp m/bar/', 'foo bar baz')
|
||||||
self.assertResponse('last --from %s' % self.nick.upper(),
|
self.assertResponse('last --from %s' % self.nick.upper(),
|
||||||
'@last --regexp m/bar/')
|
'@last --regexp m/bar/')
|
||||||
|
self.assertResponse('last --from %s*' % self.nick[0],
|
||||||
|
'@last --from %s' % self.nick.upper())
|
||||||
|
|
||||||
def testMore(self):
|
def testMore(self):
|
||||||
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
self.assertRegexp('echo %s' % ('abc'*300), 'more')
|
||||||
|
Loading…
Reference in New Issue
Block a user