| 1 | # This file represent tests that may be expensive to run on some regex engines. |
| 2 | # For example, tests that build a full DFA ahead of time and minimize it can |
| 3 | # take a horrendously long time on regexes that are large (or result in an |
| 4 | # explosion in the number of states). We group these tests together so that |
| 5 | # such engines can simply skip these tests. |
| 6 | |
| 7 | # See: https://github.com/rust-lang/regex/issues/98 |
| 8 | [[test]] |
| 9 | name = "regression-many-repeat-no-stack-overflow" |
| 10 | regex = '^.{1,2500}' |
| 11 | haystack = "a" |
| 12 | matches = [[0, 1]] |
| 13 | |
| 14 | # This test is meant to blow the bounded backtracker's visited capacity. In |
| 15 | # order to do that, we need a somewhat sizeable regex. The purpose of this |
| 16 | # is to make sure there's at least one test that exercises this path in the |
| 17 | # backtracker. All other tests (at time of writing) are small enough that the |
| 18 | # backtracker can handle them fine. |
| 19 | [[test]] |
| 20 | name = "backtrack-blow-visited-capacity" |
| 21 | regex = '\pL{50}' |
| 22 | haystack = "abcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyabcdefghijklmnopqrstuvwxyZZ" |
| 23 | matches = [[0, 50], [50, 100], [100, 150]] |