[pypy-svn] r75883 - pypy/branch/rsre2/pypy/rlib/rsre/test

arigo at codespeak.net arigo at codespeak.net
Tue Jul 6 09:15:16 CEST 2010


Author: arigo
Date: Tue Jul  6 09:15:15 2010
New Revision: 75883

Modified:
   pypy/branch/rsre2/pypy/rlib/rsre/test/test_match.py
Log:
A test showing that the part between REPEAT and UNTIL must lead
all possible answers, not just the first.


Modified: pypy/branch/rsre2/pypy/rlib/rsre/test/test_match.py
==============================================================================
--- pypy/branch/rsre2/pypy/rlib/rsre/test/test_match.py	(original)
+++ pypy/branch/rsre2/pypy/rlib/rsre/test/test_match.py	Tue Jul  6 09:15:15 2010
@@ -168,3 +168,7 @@
         res = rsre.match(r, "abcdedede")
         assert res.flatten_marks() == [0, 9, 1, 2, 7, 9, 7, 8, 8, 9]
         assert res.flatten_marks() == [0, 9, 1, 2, 7, 9, 7, 8, 8, 9]
+
+    def test_bug1(self):
+        r = get_code(r"(?:.+)?B")
+        assert rsre.match(r, "AB") is not None



More information about the Pypy-commit mailing list