From aed9f14bbcb45155a0704f0dc22beb71e2fabeea Mon Sep 17 00:00:00 2001 From: "A. Sakashita" Date: Sun, 1 Sep 2024 17:28:13 +0900 Subject: [PATCH] Added default locale to avoid tests failed on non-English machine. https://github.com/checkstyle/patch-filters/issues/367 --- .../checkstyle/filters/AbstractPatchFilterEvaluationTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java index c3dbf450..a68c7849 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/filters/AbstractPatchFilterEvaluationTest.java @@ -34,6 +34,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; +import java.util.Locale; import java.util.stream.Collectors; import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport; @@ -51,6 +52,8 @@ abstract class AbstractPatchFilterEvaluationTest extends AbstractModuleTestSuppo protected void testByConfig(String configPath) throws Exception { + Locale.setDefault(Locale.ENGLISH); + final String inputFile = configPath.replaceFirst( "(default|zero)ContextConfig.xml", ""); // we can add here any variable to provide path to patch name by PropertiesExpander