Add more regex tests (and fix one atomicity bug) (#33458)
* Avoid automatically making Regex loops followed by a lookbehind atomic
We allow a positive lookahead to be used to determine whether a loop can be upgraded to be atomic, but we're currently missing the RTL check that distinguishes between positive lookaheads and positive lookbehinds, so we're currently erroneously making some loops followed by positive lookbehinds atomic when we shouldn't. Fix that just by ensuring we only traverse Require nodes when they're lookahead rather than behind.
Also, just for additional safety, change a subsequent check to ensure that the two nodes being compared have identical options. Today we're just checking for case-sensitivity, but it's more robust (and doesn't hurt) to just check all options.
* Add more tests to boost code coverage
Plus lookaround tests for min length computation
12 files changed: