mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Use String#replace instead of String#replaceAll in tests
See gh-36678
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ class ScriptUtilsTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() throws Exception {
|
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() throws Exception {
|
||||||
String script = readScript("test-data-with-comments.sql").replaceAll("\n", "\r\n");
|
String script = readScript("test-data-with-comments.sql").replace("\n", "\r\n");
|
||||||
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ class ScriptUtilsTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() {
|
void readAndSplitScriptContainingCommentsWithWindowsLineEnding() {
|
||||||
String script = readScript("test-data-with-comments.sql").replaceAll("\n", "\r\n");
|
String script = readScript("test-data-with-comments.sql").replace("\n", "\r\n");
|
||||||
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
splitScriptContainingComments(script, DEFAULT_COMMENT_PREFIXES);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -232,7 +232,7 @@ class XpathAssertionTests {
|
|||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<title>Test Feed</title>
|
<title>Test Feed</title>
|
||||||
<icon>https://www.example.com/favicon.ico</icon>
|
<icon>https://www.example.com/favicon.ico</icon>
|
||||||
</feed>""".replaceAll("\n", "\r\n");
|
</feed>""".replace("\n", "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -232,7 +232,7 @@ class XpathAssertionTests {
|
|||||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||||
<title>Test Feed</title>
|
<title>Test Feed</title>
|
||||||
<icon>https://www.example.com/favicon.ico</icon>
|
<icon>https://www.example.com/favicon.ico</icon>
|
||||||
</feed>""".replaceAll("\n", "\r\n");
|
</feed>""".replace("\n", "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user