aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-01-17 01:49:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-17 01:49:14 +0000
commit2334bf6d8c83e26b7932fbe8e195ab3429d62a04 (patch)
tree7845a40c88082a9c3319074792c6d2b5b0ac6593 /tests/src
parente4f584de733b2531384879962966912871ffbf5a (diff)
parent60afa7000f14f8f8ca890236f636d45a2b59b61e (diff)
downloadlatinime-2334bf6d8c83e26b7932fbe8e195ab3429d62a04.tar.gz
latinime-2334bf6d8c83e26b7932fbe8e195ab3429d62a04.tar.xz
latinime-2334bf6d8c83e26b7932fbe8e195ab3429d62a04.zip
Merge "Fix a bug specific to German capitalization."
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java b/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
index 40a103b84..020d63299 100644
--- a/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
+++ b/tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java
@@ -94,5 +94,20 @@ public class CapsModeUtilsTests extends AndroidTestCase {
allPathsForCaps("\"Word.\" ", c | w, sp, false);
allPathsForCaps("\"Word\". ", c | w | s, sp, false);
allPathsForCaps("\"Word\" ", c | w, sp, false);
+
+ // Test special case for German. German does not capitalize at the start of a
+ // line when the previous line starts with a comma. It does in other cases.
+ sp = job.runInLocale(res, Locale.GERMAN);
+ allPathsForCaps("Liebe Sara,\n", c | w, sp, false);
+ allPathsForCaps("Liebe Sara,\n", c | w, sp, true);
+ allPathsForCaps("Liebe Sara, \n ", c | w, sp, false);
+ allPathsForCaps("Liebe Sara \n ", c | w | s, sp, false);
+ allPathsForCaps("Liebe Sara.\n ", c | w | s, sp, false);
+ sp = job.runInLocale(res, Locale.ENGLISH);
+ allPathsForCaps("Liebe Sara,\n", c | w | s, sp, false);
+ allPathsForCaps("Liebe Sara,\n", c | w | s, sp, true);
+ allPathsForCaps("Liebe Sara, \n ", c | w | s, sp, false);
+ allPathsForCaps("Liebe Sara \n ", c | w | s, sp, false);
+ allPathsForCaps("Liebe Sara.\n ", c | w | s, sp, false);
}
}