Changed the name of the strlen command just to be 'len'.

This commit is contained in:
Jeremy Fincher 2005-02-10 07:04:08 +00:00
parent afd53f212d
commit fdbecfd1d4
2 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class String(callbacks.Plugin):
irc.reply(utils.str.soundex(text, length))
soundex = wrap(soundex, ['somethingWithoutSpaces', additional('int', 4)])
def strlen(self, irc, msg, args):
def len(self, irc, msg, args):
"""<text>
Returns the length of <text>.

View File

@ -75,6 +75,9 @@ def group(seq, groupSize, noneFill=True):
class StringTestCase(PluginTestCase):
plugins = ('String', 'Format', 'Status')
def testLen(self):
self.assertResponse('len foo', '3')
def testNoErrors(self):
self.assertNotError('levenshtein Python Perl')