mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Fixed bug #832590.
This commit is contained in:
parent
b0fd3f547c
commit
895ecf718f
@ -226,7 +226,7 @@ class Tokenizer:
|
||||
#
|
||||
# These are the characters valid in a token. Everything printable except
|
||||
# double-quote, left-bracket, and right-bracket.
|
||||
validChars = string.ascii[33:].translate(string.ascii, '"[]')
|
||||
validChars = string.ascii.translate(string.ascii, '\x00\r\n \t"[]')
|
||||
def __init__(self, tokens=''):
|
||||
# Add a '|' to tokens to have the pipe syntax.
|
||||
self.validChars = self.validChars.translate(string.ascii, tokens)
|
||||
|
@ -98,6 +98,19 @@ class TokenizerTestCase(unittest.TestCase):
|
||||
['baz', 'quux', ['foo', 'bar']])
|
||||
finally:
|
||||
conf.enablePipeSyntax = False
|
||||
|
||||
def testBold(self):
|
||||
s = '\x02foo\x02'
|
||||
self.assertEqual(tokenize(s), [s])
|
||||
s = s[:-1] + '\x0f'
|
||||
self.assertEqual(tokenize(s), [s])
|
||||
|
||||
|
||||
def testColor(self):
|
||||
s = '\x032,3foo\x03'
|
||||
self.assertEqual(tokenize(s), [s])
|
||||
s = s[:-1] + '\x0f'
|
||||
self.assertEqual(tokenize(s), [s])
|
||||
|
||||
|
||||
class FunctionsTestCase(unittest.TestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user