diff options
author | David Mitchell <davem@iabyn.com> | 2011-12-19 12:27:48 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2012-06-13 13:32:48 +0100 |
commit | 23af30a1edf3b57b8b6950f73f724cce1266fdbd (patch) | |
tree | 8509e3888ff6176bea7dc5e133a74e61f53e0397 /lib | |
parent | 629cd4f36c79e2b9633bff622171e643c504eaf2 (diff) | |
download | perl-23af30a1edf3b57b8b6950f73f724cce1266fdbd.tar.gz |
add tests for regex recompilation
The run-time regexp compilation (invoked via pp_regcomp()) has a mechanism
to skip the recompilation if the pattern text hasn't changed since the
last recompile. Astonishingly this mechanism isn't actually tested, so
here's a test file.
All the tests now pass, but this is due to the various recent fixes in
this branch. In particular, it never used to consider the UTF8ness of the
pattern string, or whether the pattern contained code blocks.
It works by checking the output of 'use re debug' (and -Dr if available)
to detect how many times the pattern was compiled.
This file then is also an indirect test of whether the correct debugging
output is generated, i.e. whether the regcomp.c or ext/re/re_comp.c
versions of functions are getting called.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions