Resolve nested placeholders with a fallback having one

This commit fixes a regression in PlaceHolderParser where it would no
longer resolve nested placeholders for a case where the fallback has a
placeholder itself.

This is due to the Part implementations and how they are structure, and
this commit makes sure that nested resolution happens consistently.

Closes gh-34020
This commit is contained in:
Stéphane Nicoll
2024-12-05 16:33:27 +01:00
parent 81a9f3d50b
commit e618f922c2
2 changed files with 102 additions and 38 deletions

View File

@@ -210,6 +210,8 @@ class PlaceholderParserTests {
static Stream<Arguments> nestedPlaceholders() {
return Stream.of(
Arguments.of("${p6}", "v1:v2:def"),
Arguments.of("${p6:not-used}", "v1:v2:def"),
Arguments.of("${p6:${invalid}}", "v1:v2:def"),
Arguments.of("${invalid:${p1}:${p2}}", "v1:v2"),
Arguments.of("${invalid:${p3}}", "v1:v2"),
Arguments.of("${invalid:${p4}}", "v1:v2"),