Brendan McCollam committed d4106f5

Fixes bug where regex dot could generate newline characters.

Comments (0)

Files changed (3)


         pattern = r'foo'
         assert re.match(pattern,
+    def test_dot(self):
+        """
+        Verify that the dot character doesn't produce newlines.
+        See:
+        """
+        pattern = r'.+'
+        for i in xrange(100):
+            assert re.match(pattern,
     def test_digit(self):
         pattern = r'\d'
         assert re.match(pattern,
                                 string.printable.replace(unichr(x), '')),
              "at": lambda x: '',
              "in": lambda x: self._handle_in(x),
-             "any": lambda x: self.printable(1),
+             "any": lambda x: self.printable(1, exclude='\n'),
              "range": lambda x: [unichr(i) for i in xrange(x[0], x[1] + 1)],
              "category": lambda x: self._categories[x](),
              'branch': lambda x: ''.join(self._handle_state(i) for
 import unittest
-      version='2.1.2',
+      version='2.1.3',
       description='Generate random strings in Python',
       author='Leapfrog Direct Response LLC',