mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Fixed some space problems in Google.calc.
This commit is contained in:
parent
71c752a7fb
commit
eb23fa3b14
@ -422,8 +422,8 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
if match is not None:
|
if match is not None:
|
||||||
s = match.group(1)
|
s = match.group(1)
|
||||||
s = self._calcSupRe.sub(r'^(\1)', s)
|
s = self._calcSupRe.sub(r'^(\1)', s)
|
||||||
s = self._calcFontRe.sub(r' , ', s)
|
s = self._calcFontRe.sub(r',', s)
|
||||||
s = self._calcTimesRe.sub(r' * ', s)
|
s = self._calcTimesRe.sub(r'*', s)
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
else:
|
else:
|
||||||
irc.reply('Google\'s calculator didn\'t come up with anything.')
|
irc.reply('Google\'s calculator didn\'t come up with anything.')
|
||||||
|
@ -43,6 +43,8 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
'the speed of light '
|
'the speed of light '
|
||||||
'in microns / fortnight', '×')
|
'in microns / fortnight', '×')
|
||||||
|
|
||||||
|
def testCalcDoesNotHaveExtraSpaces(self):
|
||||||
|
self.assertNotRegexp('google calc 1000^2', r'\s+,\s+')
|
||||||
|
|
||||||
def testNoNoLicenseKeyError(self):
|
def testNoNoLicenseKeyError(self):
|
||||||
conf.supybot.plugins.Google.groupsSnarfer.setValue(True)
|
conf.supybot.plugins.Google.groupsSnarfer.setValue(True)
|
||||||
|
Loading…
Reference in New Issue
Block a user