From 933bbb3a3975329e549331c447eb99c4cde2dd11 Mon Sep 17 00:00:00 2001 From: Pieter12345 Date: Fri, 22 Mar 2019 02:13:01 +0100 Subject: [PATCH] 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. --- app/test/processing/app/CommandLineTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test/processing/app/CommandLineTest.java b/app/test/processing/app/CommandLineTest.java index c5fb7b8a1..9ac760b1f 100644 --- a/app/test/processing/app/CommandLineTest.java +++ b/app/test/processing/app/CommandLineTest.java @@ -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); } }