Added test for empty nested command.

This commit is contained in:
Jeremy Fincher 2003-10-29 16:09:20 +00:00
parent afbf513df2
commit 50e1690fca

View File

@ -255,6 +255,14 @@ class PrivmsgTestCase(ChannelPluginTestCase):
self.assertRegexp('help first firstcmd', 'First', 0) # no re.I flag. self.assertRegexp('help first firstcmd', 'First', 0) # no re.I flag.
self.assertRegexp('help firstrepeat firstcmd', 'FirstRepeat', 0) self.assertRegexp('help firstrepeat firstcmd', 'FirstRepeat', 0)
def testEmptyNest(self):
self.assertError('echo []')
try:
conf.replyWhenNotCommand = True
self.assertResponse('echo []', '[]')
finally:
conf.replyWhenNotCommand = False
def testDispatcherHelp(self): def testDispatcherHelp(self):
self.assertNotRegexp('help first', r'\(dispatcher') self.assertNotRegexp('help first', r'\(dispatcher')
self.assertNotRegexp('help first', r'%s') self.assertNotRegexp('help first', r'%s')