mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Add a test to verify the nick converter honors strictRfc
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
4c01cb93e0
commit
1fdf3688e9
@ -30,6 +30,7 @@
|
|||||||
from supybot.test import *
|
from supybot.test import *
|
||||||
|
|
||||||
from supybot.commands import *
|
from supybot.commands import *
|
||||||
|
import supybot.conf as conf
|
||||||
import supybot.irclib as irclib
|
import supybot.irclib as irclib
|
||||||
import supybot.ircmsgs as ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
@ -72,6 +73,16 @@ class GeneralContextTestCase(CommandsTestCase):
|
|||||||
self.assertState(['int'], ['1'], [1])
|
self.assertState(['int'], ['1'], [1])
|
||||||
self.assertState(['int', 'int', 'int'], ['1', '2', '3'], [1, 2, 3])
|
self.assertState(['int', 'int', 'int'], ['1', '2', '3'], [1, 2, 3])
|
||||||
|
|
||||||
|
def testSpecNick(self):
|
||||||
|
strict = conf.supybot.protocols.irc.strictRfc()
|
||||||
|
try:
|
||||||
|
conf.supybot.protocols.irc.strictRfc.setValue(True)
|
||||||
|
self.assertError(['nick'], ['1abc'])
|
||||||
|
conf.supybot.protocols.irc.strictRfc.setValue(False)
|
||||||
|
self.assertState(['nick'], ['1abc'], ['1abc'])
|
||||||
|
finally:
|
||||||
|
conf.supybot.protocols.irc.strictRfc.setValue(strict)
|
||||||
|
|
||||||
def testSpecLong(self):
|
def testSpecLong(self):
|
||||||
self.assertState(['long'], ['1'], [1L])
|
self.assertState(['long'], ['1'], [1L])
|
||||||
self.assertState(['long', 'long', 'long'], ['1', '2', '3'],
|
self.assertState(['long', 'long', 'long'], ['1', '2', '3'],
|
||||||
|
Loading…
Reference in New Issue
Block a user