mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Fix windows build
This commit is contained in:
parent
e52c190b05
commit
68d875bdc6
@ -20,13 +20,13 @@ import java.text.BreakIterator;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Utility to extract a descriptions.
|
||||
* Utility to extract a description.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
class DescriptionExtractor {
|
||||
|
||||
private static final String NEW_LINE = System.getProperty("line.separator");
|
||||
static final String NEW_LINE = System.getProperty("line.separator");
|
||||
|
||||
public String getShortDescription(String description) {
|
||||
if (description == null) {
|
||||
|
@ -38,14 +38,17 @@ public class DescriptionExtractorTests {
|
||||
@Test
|
||||
public void extractShortDescriptionNewLineBeforeDot() {
|
||||
assertEquals("My short description.",
|
||||
this.extractor.getShortDescription("My short\ndescription.\nMore stuff."));
|
||||
this.extractor.getShortDescription("My short" + DescriptionExtractor.NEW_LINE +
|
||||
"description." + DescriptionExtractor.NEW_LINE + "More stuff."));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void extractShortDescriptionNewLineBeforeDotWithSpaces() {
|
||||
assertEquals("My short description.",
|
||||
this.extractor
|
||||
.getShortDescription("My short \n description. \nMore stuff."));
|
||||
.getShortDescription("My short "
|
||||
+ DescriptionExtractor.NEW_LINE + " description. "
|
||||
+ DescriptionExtractor.NEW_LINE + "More stuff."));
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -57,7 +60,8 @@ public class DescriptionExtractorTests {
|
||||
@Test
|
||||
public void extractShortDescriptionNoDotMultipleLines() {
|
||||
assertEquals("My short description",
|
||||
this.extractor.getShortDescription("My short description \n More stuff"));
|
||||
this.extractor.getShortDescription("My short description "
|
||||
+ DescriptionExtractor.NEW_LINE + " More stuff"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user