mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-12-28 19:24:15 +00:00
Normalise line endings on Windows in tests
This commit is contained in:
parent
f0da6d4c36
commit
d977160e1b
2 changed files with 2 additions and 2 deletions
|
@ -134,7 +134,7 @@ public class BurntSushiValidEncoderTest {
|
||||||
|
|
||||||
private void runEncoder(String testName, TomlWriter tomlWriter) {
|
private void runEncoder(String testName, TomlWriter tomlWriter) {
|
||||||
InputStream inputTomlStream = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
InputStream inputTomlStream = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
||||||
String expectedToml = convertStreamToString(inputTomlStream);
|
String expectedToml = convertStreamToString(inputTomlStream).replaceAll("\r\n", "\n");
|
||||||
|
|
||||||
Reader inputJsonReader = new InputStreamReader(getClass().getResourceAsStream("burntsushi/valid/" + testName + ".json"));
|
Reader inputJsonReader = new InputStreamReader(getClass().getResourceAsStream("burntsushi/valid/" + testName + ".json"));
|
||||||
JsonElement jsonInput = GSON.fromJson(inputJsonReader, JsonElement.class);
|
JsonElement jsonInput = GSON.fromJson(inputJsonReader, JsonElement.class);
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class BurntSushiValidTest {
|
||||||
private void run(String testName) {
|
private void run(String testName) {
|
||||||
InputStream inputTomlStream = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
InputStream inputTomlStream = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
||||||
// InputStream inputToml = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
// InputStream inputToml = getClass().getResourceAsStream("burntsushi/valid/" + testName + ".toml");
|
||||||
String inputToml = convertStreamToString(inputTomlStream);
|
String inputToml = convertStreamToString(inputTomlStream).replaceAll("\r\n", "\n");
|
||||||
Reader expectedJsonReader = new InputStreamReader(getClass().getResourceAsStream("burntsushi/valid/" + testName + ".json"));
|
Reader expectedJsonReader = new InputStreamReader(getClass().getResourceAsStream("burntsushi/valid/" + testName + ".json"));
|
||||||
JsonElement expectedJson = GSON.fromJson(expectedJsonReader, JsonElement.class);
|
JsonElement expectedJson = GSON.fromJson(expectedJsonReader, JsonElement.class);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue