aboutsummaryrefslogtreecommitdiffstats
path: root/tests/reproducers/simple/LocalesTest
diff options
context:
space:
mode:
authorJiri Vanek <[email protected]>2013-04-26 17:01:59 +0200
committerJiri Vanek <[email protected]>2013-04-26 17:01:59 +0200
commitbfd62081c1ab28b5382c1791862ca99ff9667f6e (patch)
tree4d936c2eb337afec76c5e8b5334f8f0d1464a0a8 /tests/reproducers/simple/LocalesTest
parent14c0b3b81e20f4a70558eb0f300d31dc91d22a1f (diff)
Added polish transaltion and tests to it
Also minor changes to En and De files
Diffstat (limited to 'tests/reproducers/simple/LocalesTest')
-rw-r--r--tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java67
1 files changed, 66 insertions, 1 deletions
diff --git a/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java b/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java
index b3c3499..6f252f2 100644
--- a/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java
+++ b/tests/reproducers/simple/LocalesTest/testcases/LocalesTestTest.java
@@ -61,7 +61,6 @@ public class LocalesTestTest {
"BOArg",
"BOParam",
"BOProperty",
- "BOUpdate",
"BOLicense",
"BOVerbose",
"BOAbout",
@@ -120,6 +119,11 @@ public class LocalesTestTest {
}
+ public ResourceBundle getPropertiesPl() throws IOException {
+ return getProperties("_pl");
+
+ }
+
public ResourceBundle getPropertiesEn() throws IOException {
return getProperties("");
@@ -139,6 +143,7 @@ public class LocalesTestTest {
assertEnglish(pr.stdout);
assertNotCz(pr.stdout);
assertNotDe(pr.stdout);
+ assertNotPl(pr.stdout);
}
@Test
@@ -148,6 +153,7 @@ public class LocalesTestTest {
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
assertNotDe(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxCzCs(pr.stdout);
}
@@ -158,8 +164,30 @@ public class LocalesTestTest {
assertNotEnglish(pr.stdout);
assertNotDe(pr.stdout);
assertCz(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxCzCs(pr.stdout);
}
+
+ @Test
+ public void testLocalesPlPL() throws Exception {
+ String[] l = getChangeLocalesForSubproces("pl_PL");
+ ProcessResult pr = ServerAccess.executeProcess(javaws, null, null, l);
+ assertNotEnglish(pr.stdout);
+ assertNotCz(pr.stdout);
+ assertNotDe(pr.stdout);
+ iteratePropertiesForAproxPl(pr.stdout);
+ }
+
+ @Test
+ public void testLocalesPlPLUtf() throws Exception {
+ String[] l = getChangeLocalesForSubproces("pl_PL.UTF-8");
+ ProcessResult pr = ServerAccess.executeProcess(javaws, null, null, l);
+ assertNotEnglish(pr.stdout);
+ assertNotDe(pr.stdout);
+ assertNotCz(pr.stdout);
+ assertPl(pr.stdout);
+ iteratePropertiesForAproxPl(pr.stdout);
+ }
@Test
public void testLocalesDeDe() throws Exception {
@@ -167,6 +195,7 @@ public class LocalesTestTest {
ProcessResult pr = ServerAccess.executeProcess(javaws, null, null, l);
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxDe(pr.stdout);
}
@@ -177,6 +206,7 @@ public class LocalesTestTest {
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
assertDe(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxDe(pr.stdout);
}
@@ -187,6 +217,7 @@ public class LocalesTestTest {
ProcessResult pr = ServerAccess.executeProcess(javaws, null, null, l);
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxDe(pr.stdout);
}
@@ -197,6 +228,7 @@ public class LocalesTestTest {
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
assertDe(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxDe(pr.stdout);
}
@@ -208,6 +240,7 @@ public class LocalesTestTest {
ProcessResult pr = ServerAccess.executeProcess(javaws, null, null, l);
assertNotEnglish(pr.stdout);
assertNotCz(pr.stdout);
+ assertNotPl(pr.stdout);
iteratePropertiesForAproxDe(pr.stdout);
}
@@ -221,6 +254,7 @@ public class LocalesTestTest {
assertEnglish(pr.stdout);
assertNotCz(pr.stdout);
assertNotDe(pr.stdout);
+ assertNotPl(pr.stdout);
}
private void assertEnglish(String s) throws IOException {
@@ -237,6 +271,11 @@ public class LocalesTestTest {
ResourceBundle props = getPropertiesCz();
iteratePropertiesFor(props, s, true, "czech");
}
+
+ private void assertPl(String s) throws IOException {
+ ResourceBundle props = getPropertiesPl();
+ iteratePropertiesFor(props, s, true, "polish");
+ }
private void assertDe(String s) throws IOException {
ResourceBundle props = getPropertiesDe();
@@ -248,6 +287,11 @@ public class LocalesTestTest {
ResourceBundle props = getPropertiesCz();
iteratePropertiesFor(props, s, false, "czech");
}
+
+ private void assertNotPl(String s) throws IOException {
+ ResourceBundle props = getPropertiesPl();
+ iteratePropertiesFor(props, s, false, "polish");
+ }
private void assertNotDe(String s) throws IOException {
ResourceBundle props = getPropertiesDe();
@@ -317,6 +361,10 @@ public class LocalesTestTest {
private void iteratePropertiesForAproxDe(String stdout) throws IOException {
iteratePropertiesForAprox(stdout, getPropertiesDe(), Regexer.de);
}
+
+ private void iteratePropertiesForAproxPl(String stdout) throws IOException {
+ iteratePropertiesForAprox(stdout, getPropertiesPl(), Regexer.pl);
+ }
@@ -351,9 +399,26 @@ public class LocalesTestTest {
"]",
"(",
")"};
+
+ private static final String[] plEvil = {
+ "ó",
+ "ą",
+ "ę",
+ "ó",
+ "ł",
+ "ć",
+ "ś",
+ "ź",
+ "ż",
+ "ń",
+ "[",
+ "]",
+ "(",
+ ")"};
private static final Regexer cz = new Regexer(czEvil,"cz");
private static final Regexer de = new Regexer(deEvil,"de");
+ private static final Regexer pl = new Regexer(plEvil,"pl");
private final String[] map;
private final String id;