Add a test for literal_spaces

This commit is contained in:
Kovid Goyal 2017-06-21 08:51:24 +05:30
parent 83aaf12bd6
commit acaee61715
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -43,6 +43,7 @@ class BuildTest(unittest.TestCase):
def test_regex(self): def test_regex(self):
import regex import regex
self.assertEqual(regex.findall(r'(?i)(a)(b)', 'ab cd AB 1a1b'), [('a', 'b'), ('A', 'B')]) self.assertEqual(regex.findall(r'(?i)(a)(b)', 'ab cd AB 1a1b'), [('a', 'b'), ('A', 'B')])
self.assertEqual(regex.escape('a b', literal_spaces=True), 'a b')
def test_chardet(self): def test_chardet(self):
from chardet import detect from chardet import detect