mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Format: use string.capwords() - not .title() (#1378)
* use string.capwords() - not .title(). closes #1366 * add test case for "@format title" that checks handling apostrophes * `assertResponse` evidently needs the relevant subcommand
This commit is contained in:
parent
3c23faf1bd
commit
68539da7ab
@ -149,7 +149,7 @@ class Format(callbacks.Plugin):
|
||||
|
||||
Returns <text> titlecased.
|
||||
"""
|
||||
irc.reply(text.title())
|
||||
irc.reply(string.capwords(text, " "))
|
||||
title = wrap(title, ['text'])
|
||||
|
||||
@internationalizeDocstring
|
||||
|
@ -74,6 +74,7 @@ class FormatTestCase(PluginTestCase):
|
||||
def testTitle(self):
|
||||
self.assertResponse('title foo', 'Foo')
|
||||
self.assertResponse('title foo bar', 'Foo Bar')
|
||||
self.assertResponse('title foo\'s bar', 'Foo\'s Bar')
|
||||
|
||||
def testRepr(self):
|
||||
self.assertResponse('repr foo bar baz', '"foo bar baz"')
|
||||
|
Loading…
Reference in New Issue
Block a user