diff --git a/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java b/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java index b8350dbf7c..9fceecb9e7 100755 --- a/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java +++ b/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java @@ -5,8 +5,8 @@ ******************************************************************************* * * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java,v $ - * $Date: 2000/04/22 00:04:39 $ - * $Revision: 1.16 $ + * $Date: 2000/04/22 01:29:14 $ + * $Revision: 1.17 $ * ***************************************************************************************** */ @@ -431,6 +431,29 @@ public class TransliteratorTest extends TestFmwk { } } + /** + * Test cursor positioning outside of the key + */ + public void TestCursorOffset() { + // Array of 3n items + // Each item is , , + String[] DATA = { + "pre {alpha} post > | @ ALPHA ;" + + "eALPHA > beta ;" + + "pre {beta} post > BETA @@ | ;" + + "post > xyz", + + "prealphapost prebetapost", + "prbetaxyz preBETApost", + }; + + for (int i=0; i", DATA[i]); + expect(t, DATA[i+1], DATA[i+2]); + } + } + //====================================================================== // Support methods //====================================================================== diff --git a/icu4j/src/com/ibm/test/translit/TransliteratorTest.java b/icu4j/src/com/ibm/test/translit/TransliteratorTest.java index 0bcddf892c..8a469776cd 100755 --- a/icu4j/src/com/ibm/test/translit/TransliteratorTest.java +++ b/icu4j/src/com/ibm/test/translit/TransliteratorTest.java @@ -5,8 +5,8 @@ ******************************************************************************* * * $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/test/translit/Attic/TransliteratorTest.java,v $ - * $Date: 2000/04/22 00:04:39 $ - * $Revision: 1.16 $ + * $Date: 2000/04/22 01:29:14 $ + * $Revision: 1.17 $ * ***************************************************************************************** */ @@ -431,6 +431,29 @@ public class TransliteratorTest extends TestFmwk { } } + /** + * Test cursor positioning outside of the key + */ + public void TestCursorOffset() { + // Array of 3n items + // Each item is , , + String[] DATA = { + "pre {alpha} post > | @ ALPHA ;" + + "eALPHA > beta ;" + + "pre {beta} post > BETA @@ | ;" + + "post > xyz", + + "prealphapost prebetapost", + "prbetaxyz preBETApost", + }; + + for (int i=0; i", DATA[i]); + expect(t, DATA[i+1], DATA[i+2]); + } + } + //====================================================================== // Support methods //======================================================================