From 57edf1d256c8267868c4c9c44962dd4721d8c2b5 Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 19 Oct 2020 15:04:28 +1100 Subject: some extra tests as suggested by hvds (cherry picked from commit 3c43dd64639f7fbccb6ff32f0e82d007d2cde710) --- t/lib/croak/regcomp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/t/lib/croak/regcomp b/t/lib/croak/regcomp index 74e70ed363..a203f136fd 100644 --- a/t/lib/croak/regcomp +++ b/t/lib/croak/regcomp @@ -120,8 +120,63 @@ qr/(*negative_lookbehind:a\Ka)a/; EXPECT \K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(*negative_lookbehind:a\K <-- HERE a)a/ at - line 2. ######## +# NAME \K nesting in lookahead after lookahead +qr{(?=(?=x)x\K)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?=x)x\K <-- HERE )x/ at - line 1. +######## +# NAME \K nesting in lookahead after negative lookahead +qr{(?=(?!y)x\K)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?!y)x\K <-- HERE )x/ at - line 1. +######## +# NAME \K nesting in lookahead in negative lookahead +qr{(?=(?!y\K)x)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?!y\K <-- HERE )x)x/ at - line 1. +######## +# NAME \K nesting in lookahead in lookahead +qr{(?=(?=x\K)x)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?=x\K <-- HERE )x)x/ at - line 1. +######## +# NAME \K nesting in lookbehind after lookbehind +qr{(?<=(?<=x)x\K)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<=(?<=x)x\K <-- HERE )x/ at - line 1. +######## +# NAME \K nesting in lookahead after lookbehind +qr{(?=(?<=x)x\K)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?=(?<=x)x\K <-- HERE )x/ at - line 1. +######## +# NAME \K nesting in lookbehind after lookahead +qr{(?<=(?=x)x\K)x}; +EXPECT +\K not permitted in lookahead/lookbehind in regex; marked by <-- HERE in m/(?<=(?=x)x\K <-- HERE )x/ at - line 1. +######## +# NAME \K nesting in negative lookbehind after lookahead +qr{(?