On 18 Jul 2014, at 1:10 am, Harald Schmitt <li...@hschmitt.de> wrote:
> Am 17.07.2014 10:16, schrieb Harald Schmitt: >> Hello, >> >> the integration test case >> org.gradle.api.plugins.quality.CheckstylePluginIntegrationTest."analyze >> bad code"() does not pass with de Locale (and some others) because it >> checks for an exception message, that is localized. >> failure.error.contains("Name 'class1' must match pattern") >> >> When I build gradle the :codeQuality:integTest fails because of that. >> What is the preffered solution? >> 1) Test for the German message, too >> || failure.error.contains("'class1' entspricht nicht dem Muster") >> 2) Add an annotation that this test is only run with "en" locale > I went ahead and implemented and tested this as > @Requires(TestPrecondition.LANGUAGE_EN) > If you like this solution I can submit it, right away. I’d rather you added something like GradleExecuter.withDefaultLanguage() that the test can use, similar to withDefaultCharacterEncoding(). The InProcessGradleExecuter.assertCanExecute() method can assert that the requested language == the actual language. -- Adam Murdoch Gradle Co-founder http://www.gradle.org CTO Gradleware Inc. - Gradle Training, Support, Consulting http://www.gradleware.com