mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-03 00:41:11 -05: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.')
|
||||||
|
@ -42,8 +42,10 @@ class GoogleTestCase(ChannelPluginTestCase, PluginDocumentation):
|
|||||||
self.assertNotRegexp('google calc '
|
self.assertNotRegexp('google calc '
|
||||||
'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)
|
||||||
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'google blah'))
|
self.irc.feedMsg(ircmsgs.privmsg(self.channel, 'google blah'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user