1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

Fix CommandLineTest.testCommandLineVersion() on Windows

Fix CommandLineTest.testCommandLineVersion() failing on Windows due to Runtime.exec() returning `\r\n` line endings where the test expected `\n` line endings.
This commit is contained in:
Pieter12345 2019-03-22 02:13:01 +01:00 committed by Cristian Maglie
parent 442007a926
commit 933bbb3a39

View File

@ -139,10 +139,10 @@ public class CommandLineTest {
pr.waitFor();
Assertions.assertThat(pr.exitValue())
.as("Process will finish with exit code 0 in --version")
.isEqualTo(0);
.as("Process will finish with exit code 0 in --version")
.isEqualTo(0);
Assertions.assertThat(new String(IOUtils.toByteArray(pr.getInputStream())))
.matches("Arduino: \\d+\\.\\d+\\.\\d+.*\n");
.matches("Arduino: \\d+\\.\\d+\\.\\d+.*\r?\n");
}
@Test
@ -156,7 +156,7 @@ public class CommandLineTest {
pr.waitFor();
Assertions.assertThat(pr.exitValue())
.as("Multiple Action will be rejected")
.isEqualTo(3);
.as("Multiple Action will be rejected")
.isEqualTo(3);
}
}