Ensure testdata text always uses \n newlines. (#8756)

This commit is contained in:
Derek Perez 2021-06-22 11:48:33 -07:00 committed by GitHub
parent e9ffe09c8f
commit 91bbdc90e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3758,7 +3758,7 @@ public final class TestUtil {
/** @param filePath The path relative to {@link #getTestDataDir}. */
public static String readTextFromFile(String filePath) {
return readBytesFromFile(filePath).toStringUtf8();
return readBytesFromFile(filePath).toStringUtf8().replace(System.getProperty("line.separator"), "\n");
}
private static File getTestDataDir() {