diff options
author | Karl Williamson <khw@cpan.org> | 2018-02-19 20:28:19 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-02-19 20:47:10 -0700 |
commit | 8638266fb1a6a7f9b6ce2567347bfba94f8b2414 (patch) | |
tree | 9afac98dd79a1f83e6d28cf51f5f09d94e779c13 | |
parent | e54417e05d50aa46e805071583a78db0e3e557e9 (diff) | |
download | perl-8638266fb1a6a7f9b6ce2567347bfba94f8b2414.tar.gz |
Fix skipping char in (*sr:...) defn
This was wrongly calling nextchar(), which skipped the next character
wrongly
-rw-r--r-- | regcomp.c | 1 | ||||
-rw-r--r-- | t/re/script_run.t | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -10899,7 +10899,6 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp,U32 depth) if (RExC_in_script_run) { paren = ':'; - nextchar(pRExC_state); ret = NULL; goto parse_rest; } diff --git a/t/re/script_run.t b/t/re/script_run.t index 6779e2ee1a..5005d637a4 100644 --- a/t/re/script_run.t +++ b/t/re/script_run.t @@ -86,4 +86,7 @@ foreach my $type ('script_run', 'sr') { like("写真だけの結婚式", $script_run, "Mixed Hiragana and Han"); } + # Until fixed, this was skipping the '[' + unlike("abc]c", qr/^ (*sr:a(*sr:[bc]*)c) $/x, "Doesn't skip parts of exact matches"); + done_testing(); |