mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +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:
|
||||
s = match.group(1)
|
||||
s = self._calcSupRe.sub(r'^(\1)', s)
|
||||
s = self._calcFontRe.sub(r' , ', s)
|
||||
s = self._calcTimesRe.sub(r' * ', s)
|
||||
s = self._calcFontRe.sub(r',', s)
|
||||
s = self._calcTimesRe.sub(r'*', s)
|
||||
irc.reply(s)
|
||||
else:
|
||||
irc.reply('Google\'s calculator didn\'t come up with anything.')
|
||||
|
@ -42,8 +42,10 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
self.assertNotRegexp('google calc '
|
||||
'the speed of light '
|
||||
'in microns / fortnight', '×')
|
||||
|
||||
|
||||
def testCalcDoesNotHaveExtraSpaces(self):
|
||||
self.assertNotRegexp('google calc 1000^2', r'\s+,\s+')
|
||||
|
||||
def testNoNoLicenseKeyError(self):
|
||||
conf.supybot.plugins.Google.groupsSnarfer.setValue(True)
|
||||
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'google blah'))
|
||||
|
Loading…
Reference in New Issue
Block a user