From 1b84e208caf3c98803cc0c136a1b8fb4ce2bcf7c Mon Sep 17 00:00:00 2001 From: Daniel Folkinshteyn Date: Thu, 5 Aug 2010 01:27:38 -0400 Subject: [PATCH] Format.replace: replacement text is now allowed to be the empty string. --- plugins/Format/plugin.py | 2 +- plugins/Format/test.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Format/plugin.py b/plugins/Format/plugin.py index ebe42c407..6dc16a2cb 100644 --- a/plugins/Format/plugin.py +++ b/plugins/Format/plugin.py @@ -97,7 +97,7 @@ class Format(callbacks.Plugin): with in . """ 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): """ diff --git a/plugins/Format/test.py b/plugins/Format/test.py index f891e0dd7..3ed19470e 100644 --- a/plugins/Format/test.py +++ b/plugins/Format/test.py @@ -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')