mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Format.replace: replacement text is now allowed to be the empty string.
This commit is contained in:
parent
9398025088
commit
1b84e208ca
@ -97,7 +97,7 @@ class Format(callbacks.Plugin):
|
||||
with <substring to replace it with> in <text>.
|
||||
"""
|
||||
irc.reply(text.replace(bad, good))
|
||||
replace = wrap(replace, ['something', 'something', 'text'])
|
||||
replace = wrap(replace, ['something', 'anything', 'text'])
|
||||
|
||||
def upper(self, irc, msg, args, text):
|
||||
"""<text>
|
||||
|
@ -58,6 +58,7 @@ class FormatTestCase(PluginTestCase):
|
||||
|
||||
def testReplace(self):
|
||||
self.assertResponse('replace # %23 bla#foo', 'bla%23foo')
|
||||
self.assertResponse('replace foo "" blafoobar', 'blabar')
|
||||
|
||||
def testUpper(self):
|
||||
self.assertResponse('upper foo', 'FOO')
|
||||
|
Loading…
Reference in New Issue
Block a user