From d338789a7bfd6d0ade1990d3c07b26a53255cc2e Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 23 Nov 2003 13:25:43 +0000 Subject: [PATCH] Fixed bug in acronym showing the header, added a test. --- plugins/Http.py | 3 ++- test/test_Http.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/Http.py b/plugins/Http.py index c472aac14..b73d72c61 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -265,7 +265,8 @@ class Http(callbacks.Privmsg): quote = ' // '.join(quote.splitlines()) irc.reply(msg, quote) - _acronymre = re.compile(r'width="7\d%" bgcolor="[^"]+">(?:)?([^<]+)') + _acronymre = re.compile(r'valign="middle" width="7\d%" bgcolor="[^"]+">' + r'(?:)?([^<]+)') def acronym(self, irc, msg, args): """ diff --git a/test/test_Http.py b/test/test_Http.py index e3c0aa914..d87a4ccb8 100644 --- a/test/test_Http.py +++ b/test/test_Http.py @@ -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):