Add support for custom locale to render compiler messages
Closes gh-31408
This commit is contained in:
@@ -19,6 +19,7 @@ package org.springframework.core.test.tools;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -170,8 +171,8 @@ class TestCompilerTests {
|
||||
}
|
||||
""");
|
||||
assertThatExceptionOfType(CompilationException.class).isThrownBy(
|
||||
() -> TestCompiler.forSystem().failOnWarning().withSources(
|
||||
SourceFile.of(HELLO_DEPRECATED), main).compile(compiled -> {
|
||||
() -> TestCompiler.forSystem().failOnWarning().withLocale(Locale.ENGLISH)
|
||||
.withSources(SourceFile.of(HELLO_DEPRECATED), main).compile(compiled -> {
|
||||
})).withMessageContaining("warnings found and -Werror specified");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user