mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-11-27 05:07:30 +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
|
# These are the characters valid in a token. Everything printable except
|
||||||
# double-quote, left-bracket, and right-bracket.
|
# 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=''):
|
def __init__(self, tokens=''):
|
||||||
# Add a '|' to tokens to have the pipe syntax.
|
# Add a '|' to tokens to have the pipe syntax.
|
||||||
self.validChars = self.validChars.translate(string.ascii, tokens)
|
self.validChars = self.validChars.translate(string.ascii, tokens)
|
||||||
|
|||||||
@ -99,6 +99,19 @@ class TokenizerTestCase(unittest.TestCase):
|
|||||||
finally:
|
finally:
|
||||||
conf.enablePipeSyntax = False
|
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):
|
class FunctionsTestCase(unittest.TestCase):
|
||||||
def testCanonicalName(self):
|
def testCanonicalName(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user