mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-26 20:14:20 +01:00
@echo should reply with help when it receives no arguments
This commit is contained in:
parent
ca8ed7204b
commit
ee7ce27b61
@ -122,6 +122,8 @@ class Utilities(callbacks.Privmsg):
|
|||||||
|
|
||||||
Returns the arguments given it.
|
Returns the arguments given it.
|
||||||
"""
|
"""
|
||||||
|
if not args:
|
||||||
|
raise callbacks.ArgumentError
|
||||||
irc.reply(msg, ' '.join(args), prefixName=False)
|
irc.reply(msg, ' '.join(args), prefixName=False)
|
||||||
|
|
||||||
def action(self, irc, msg, args):
|
def action(self, irc, msg, args):
|
||||||
|
@ -61,6 +61,7 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation):
|
|||||||
self.assertResponse('strconcat foo bar baz', 'foobar baz')
|
self.assertResponse('strconcat foo bar baz', 'foobar baz')
|
||||||
|
|
||||||
def testEcho(self):
|
def testEcho(self):
|
||||||
|
self.assertHelp('echo')
|
||||||
self.assertResponse('echo foo', 'foo')
|
self.assertResponse('echo foo', 'foo')
|
||||||
m = self.getMsg('cpustats')
|
m = self.getMsg('cpustats')
|
||||||
self.assertResponse('echo "%s"' % m.args[1], m.args[1])
|
self.assertResponse('echo "%s"' % m.args[1], m.args[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user