Skip to content

Commit 933bbb3

Browse files
Pieter12345cmaglie
authored andcommitted
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.
1 parent 442007a commit 933bbb3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/test/processing/app/CommandLineTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ public void testCommandLineVersion() throws Exception {
139139
pr.waitFor();
140140

141141
Assertions.assertThat(pr.exitValue())
142-
.as("Process will finish with exit code 0 in --version")
143-
.isEqualTo(0);
142+
.as("Process will finish with exit code 0 in --version")
143+
.isEqualTo(0);
144144
Assertions.assertThat(new String(IOUtils.toByteArray(pr.getInputStream())))
145-
.matches("Arduino: \\d+\\.\\d+\\.\\d+.*\n");
145+
.matches("Arduino: \\d+\\.\\d+\\.\\d+.*\r?\n");
146146
}
147147

148148
@Test
@@ -156,7 +156,7 @@ public void testCommandLineMultipleAction() throws Exception {
156156
pr.waitFor();
157157

158158
Assertions.assertThat(pr.exitValue())
159-
.as("Multiple Action will be rejected")
160-
.isEqualTo(3);
159+
.as("Multiple Action will be rejected")
160+
.isEqualTo(3);
161161
}
162162
}

0 commit comments

Comments
 (0)