diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-10-03 12:32:09 +0200 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-10-03 12:33:22 +0200 |
commit | c024588873d4b1b235b70371ec897b97d6e25fdb (patch) | |
tree | edf6eb8943a01f100be595fe75683791ae35e6be /sonar-testing-harness/src/test | |
parent | 62ec1ada6f9c17f4e20fc1905a1c98d67461be78 (diff) | |
download | sonarqube-c024588873d4b1b235b70371ec897b97d6e25fdb.tar.gz sonarqube-c024588873d4b1b235b70371ec897b97d6e25fdb.zip |
SONAR-3736 Fix regression (additional keys not displayed if any)
Diffstat (limited to 'sonar-testing-harness/src/test')
-rw-r--r-- | sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java | 7 | ||||
-rw-r--r-- | sonar-testing-harness/src/test/resources/org/sonar/l10n/myPlugin_fr.properties | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java b/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java index 2eb97a82a6e..8795c79304f 100644 --- a/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java +++ b/sonar-testing-harness/src/test/java/org/sonar/test/i18n/BundleSynchronizedMatcherTest.java @@ -58,12 +58,19 @@ public class BundleSynchronizedMatcherTest { } @Test + public void shouldMatchEvenWithAdditionalKeys() { + assertThat("myPlugin_fr_QB.properties", matcher); + assertFalse(new File("target/l10n/myPlugin_fr_CA.properties.report.txt").exists()); + } + + @Test public void shouldNotMatch() { try { assertThat("myPlugin_fr.properties", matcher); assertTrue(new File("target/l10n/myPlugin_fr.properties.report.txt").exists()); } catch (AssertionError e) { assertThat(e.getMessage(), containsString("Missing translations are:\nsecond.prop")); + assertThat(e.getMessage(), containsString("The following translations do not exist in the reference bundle:\nfourth.prop")); } } diff --git a/sonar-testing-harness/src/test/resources/org/sonar/l10n/myPlugin_fr.properties b/sonar-testing-harness/src/test/resources/org/sonar/l10n/myPlugin_fr.properties index 79c32ed5e81..cd5063e7701 100644 --- a/sonar-testing-harness/src/test/resources/org/sonar/l10n/myPlugin_fr.properties +++ b/sonar-testing-harness/src/test/resources/org/sonar/l10n/myPlugin_fr.properties @@ -1,4 +1,5 @@ ## -------- Test file for the BundleSynchronizedMatcher -------- ## first.prop = C'est ma première propriété #second.prop = C'est ma deuxième propriété -third.prop = C'est ma troisième propriété
\ No newline at end of file +third.prop = C'est ma troisième propriété +fourth.prop = C'est ma quatrième propriété
\ No newline at end of file |