From 60afa7000f14f8f8ca890236f636d45a2b59b61e Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Thu, 16 Jan 2014 04:32:32 +0900 Subject: Fix a bug specific to German capitalization. Bug: 9663105 Change-Id: Ib68ee4edb135e96dfca229c1ccce308e7e638bdd --- .../inputmethod/latin/utils/CapsModeUtilsTests.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/src/com/android/inputmethod/latin/utils/CapsModeUtilsTests.java') 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); } } -- cgit v1.2.3-83-g751a