diff options
-rw-r--r-- | tests/test_regexopt.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_regexopt.py b/tests/test_regexopt.py index 66f7c609..02a8f56c 100644 --- a/tests/test_regexopt.py +++ b/tests/test_regexopt.py @@ -66,3 +66,11 @@ class RegexOptTestCase(unittest.TestCase): self.assertFalse(rex.match('a')) self.assertTrue(rex.match('a::')) self.assertFalse(rex.match(':::')) # fullmatch + + def test_suffix_opt(self): + # test that detected suffixes remain sorted. + opt = regex_opt(('afoo', 'abfoo')) + print(opt) + rex = re.compile(opt) + m = rex.match('abfoo') + self.assertEqual(5, m.end()) |