mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Fixed a bug in handling of multiplication in results.
This commit is contained in:
parent
ec6779b43e
commit
9da5d05f8f
@ -370,7 +370,7 @@ class Google(callbacks.PluginRegexp):
|
||||
_calcRe = re.compile(r'<td nowrap><font size=\+1><b>(.*?)</b>', re.I)
|
||||
_calcSupRe = re.compile(r'<sup>(.*?)</sup>', re.I)
|
||||
_calcFontRe = re.compile(r'<font size=-2>(.*?)</font>')
|
||||
_calcTimesRe = re.compile(r'×')
|
||||
_calcTimesRe = re.compile(r'&(?:times|#215);')
|
||||
def calc(self, irc, msg, args, expr):
|
||||
"""<expression>
|
||||
|
||||
|
@ -32,6 +32,9 @@ from supybot.test import *
|
||||
class GoogleTestCase(ChannelPluginTestCase):
|
||||
plugins = ('Google',)
|
||||
if network:
|
||||
def testCalcHandlesMultiplicationSymbol(self):
|
||||
self.assertNotRegexp('google calc seconds in a century', r'215')
|
||||
|
||||
def testCalc(self):
|
||||
self.assertNotRegexp('google calc e^(i*pi)+1', r'didn\'t')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user