Skip to content

Commit

Permalink
Polish "Fix error mark position for PatternParseException"
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed Jan 10, 2024
1 parent fccce54 commit 47e8f61
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,11 @@ class PatternParseFailureAnalyzerTests {
@Test
void patternParseFailureQuotesPattern() {
FailureAnalysis failureAnalysis = performAnalysis("/spring/**/framework");
assertThat(failureAnalysis.getDescription()).contains("""
Invalid mapping pattern detected:
/spring/**/framework
^
""");
assertThat(failureAnalysis.getDescription())
.contains("Invalid mapping pattern detected:\n" + "/spring/**/framework\n" + " ^");
assertThat(failureAnalysis.getAction())
.contains("Fix this pattern in your application or switch to the legacy parser"
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
.contains("Fix this pattern in your application or switch to the legacy parser"
+ " implementation with 'spring.mvc.pathmatch.matching-strategy=ant_path_matcher'.");
}

private FailureAnalysis performAnalysis(String pattern) {
Expand Down

0 comments on commit 47e8f61

Please sign in to comment.