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

pull/8773/head
Derek Perez 4 years ago committed by GitHub
parent e9ffe09c8f
commit 91bbdc90e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      java/core/src/test/java/com/google/protobuf/TestUtil.java

@ -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() {

Loading…
Cancel
Save