Fixed bug in acronym showing the header, added a test.

This commit is contained in:
Jeremy Fincher 2003-11-23 13:25:43 +00:00
parent d05a9a3121
commit d338789a7b
2 changed files with 3 additions and 2 deletions

View File

@ -265,7 +265,8 @@ class Http(callbacks.Privmsg):
quote = ' // '.join(quote.splitlines())
irc.reply(msg, quote)
_acronymre = re.compile(r'width="7\d%" bgcolor="[^"]+">(?:<b>)?([^<]+)')
_acronymre = re.compile(r'valign="middle" width="7\d%" bgcolor="[^"]+">'
r'(?:<b>)?([^<]+)')
def acronym(self, irc, msg, args):
"""<acronym>

View File

@ -67,7 +67,7 @@ class HttpTest(PluginTestCase, PluginDocumentation):
def testAcronym(self):
self.assertRegexp('acronym ASAP', 'as soon as possible')
self.assertNotError('acronym PERL')
self.assertNotRegexp('acronym asap', 'Definition')
self.assertNotRegexp('acronym UNIX', 'not an acronym')
def testNetcraft(self):