plugins/Topic: Add a proper test for the previous Topic.set fix.

This commit is contained in:
James Vega 2005-06-01 21:06:04 +00:00
parent b41166cc4c
commit a477f12f47
1 changed files with 8 additions and 1 deletions

View File

@ -133,7 +133,14 @@ class TopicTestCase(ChannelPluginTestCase):
self.assertNotRegexp('topic set -1 baz', 'bar')
self.assertResponse('topic set foo bar baz', 'foo bar baz')
# Catch a bug we had where setting topic 1 would reset the whole topic
self.assertNotResponse('topic set 1 bar', 'bar')
orig = conf.supybot.plugins.Topic.format()
sep = conf.supybot.plugins.Topic.separator()
try:
conf.supybot.plugins.Topic.format.setValue('$topic')
self.assertResponse('topic add baz', 'foo bar baz%sbaz' % sep)
self.assertResponse('topic set 1 bar', 'bar%sbaz' % sep)
finally:
conf.supybot.plugins.Topic.format.setValue(orig)
def testUndo(self):
try: