mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-21 00:07:48 +01:00
Fix partial placeholder replacement, fix tests
This commit is contained in:
parent
7d86538621
commit
1440a88387
@ -88,7 +88,6 @@ public final class StringWithPlaceholders {
|
||||
output.setLength(0);
|
||||
}
|
||||
newStringParts.add(placeholderStringPart);
|
||||
output.append(placeholderStringPart.nonReplacedString);
|
||||
fullOutput.append(placeholderStringPart.nonReplacedString);
|
||||
}
|
||||
} else {
|
||||
|
@ -35,6 +35,7 @@ class StringWithPlaceholdersTest {
|
||||
StringWithPlaceholders s = StringWithPlaceholders.of(input);
|
||||
|
||||
assertThat(s.partiallyReplacePlaceholders(occurrence -> "#").getUnreplacedString()).isEqualTo(expectedOutput);
|
||||
assertThat(s.partiallyReplacePlaceholders(occurrence -> null).replacePlaceholders(occurrence -> "#")).isEqualTo(expectedOutput);
|
||||
assertThat(s.containsPlaceholders()).isEqualTo(expectedContainsPlaceholders);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user