diff options
author | 2014-05-28 10:13:23 +0000 | |
---|---|---|
committer | 2014-05-28 10:13:23 +0000 | |
commit | 664fceb03430bc5bad08919b1f7c8644bd1200bf (patch) | |
tree | 9c7b694944f155a413f2c4e27df69d3853b4267d /tests/src | |
parent | c1c4e34a0e59a08a8fb7e531c2fce6140c4ae3a5 (diff) | |
parent | 6ee2cfa66c81162c2a42572ea63af1b5e38e339f (diff) | |
download | latinime-664fceb03430bc5bad08919b1f7c8644bd1200bf.tar.gz latinime-664fceb03430bc5bad08919b1f7c8644bd1200bf.tar.xz latinime-664fceb03430bc5bad08919b1f7c8644bd1200bf.zip |
am 6ee2cfa6: Merge "Run test only on KitKat devices"
* commit '6ee2cfa66c81162c2a42572ea63af1b5e38e339f':
Run test only on KitKat devices
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/ShiftModeTests.java | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/tests/src/com/android/inputmethod/latin/ShiftModeTests.java b/tests/src/com/android/inputmethod/latin/ShiftModeTests.java index f3756c2c8..95851f363 100644 --- a/tests/src/com/android/inputmethod/latin/ShiftModeTests.java +++ b/tests/src/com/android/inputmethod/latin/ShiftModeTests.java @@ -16,6 +16,7 @@ package com.android.inputmethod.latin; +import android.os.Build; import android.test.suitebuilder.annotation.LargeTest; import android.text.TextUtils; import android.view.inputmethod.EditorInfo; @@ -111,15 +112,23 @@ public class ShiftModeTests extends InputTestsBase { } public void testOtherSentenceSeparators() { - changeLanguage("hy-AM"); - assertTrue("(Armenian) Auto caps at start", isCapsModeAutoShifted()); - type("Hey. "); - assertFalse("(Armenian) No auto-caps after latin period", isCapsModeAutoShifted()); - type("Hey\u0589"); - assertFalse("(Armenian) No auto-caps directly after armenian period", - isCapsModeAutoShifted()); - type(" "); - assertTrue("(Armenian) Auto-caps after armenian period-whitespace", - isCapsModeAutoShifted()); + // We only run this test on Kitkat+ because previous versions of Android don't + // have an Armenian locale. For some reason I don't know, when the requested + // locale is not present as a device locale, then the application under test can't + // access the resources in that locale -- though it works when the app is actually + // running on the device and not under test. If we ever figure out what's going + // on, remove this test. + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { + changeLanguage("hy-AM"); + assertTrue("(Armenian) Auto caps at start", isCapsModeAutoShifted()); + type("Hey. "); + assertFalse("(Armenian) No auto-caps after latin period", isCapsModeAutoShifted()); + type("Hey\u0589"); + assertFalse("(Armenian) No auto-caps directly after armenian period", + isCapsModeAutoShifted()); + type(" "); + assertTrue("(Armenian) Auto-caps after armenian period-whitespace", + isCapsModeAutoShifted()); + } } } |