mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Fixed bug in acronym showing the header, added a test.
This commit is contained in:
parent
d05a9a3121
commit
d338789a7b
@ -265,7 +265,8 @@ class Http(callbacks.Privmsg):
|
|||||||
quote = ' // '.join(quote.splitlines())
|
quote = ' // '.join(quote.splitlines())
|
||||||
irc.reply(msg, quote)
|
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):
|
def acronym(self, irc, msg, args):
|
||||||
"""<acronym>
|
"""<acronym>
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class HttpTest(PluginTestCase, PluginDocumentation):
|
|||||||
|
|
||||||
def testAcronym(self):
|
def testAcronym(self):
|
||||||
self.assertRegexp('acronym ASAP', 'as soon as possible')
|
self.assertRegexp('acronym ASAP', 'as soon as possible')
|
||||||
self.assertNotError('acronym PERL')
|
self.assertNotRegexp('acronym asap', 'Definition')
|
||||||
self.assertNotRegexp('acronym UNIX', 'not an acronym')
|
self.assertNotRegexp('acronym UNIX', 'not an acronym')
|
||||||
|
|
||||||
def testNetcraft(self):
|
def testNetcraft(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user