ToLowerCase.java revision 1091
/*
* Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
* have any questions.
*/
/*
@test
@bug 4217441 4533872 4900935
@summary toLowerCase should lower-case Greek Sigma correctly depending
Locale specific (lt, tr, and az) lowercasings and supplementary
characters correctly.
*/
public class ToLowerCase {
"\u03b9\u03b5\u03c3\u03c5\u03c2 \u03c7\u03c1\u03b9\u03c3\u03c4\u03bf\u03c2"); // "IESUS XRISTOS"
// Explicit dot above for I's and J's whenever there are more accents above (Lithanian)
test("\u012E\u0300", lt, "\u012F\u0307\u0300"); // "I (w/ OGONEK)" followed by COMBINING GRAVE ACCENT (cc==230)
test("\u012E\u0316", lt, "\u012F\u0316"); // "I (w/ OGONEK)" followed by COMBINING GRAVE ACCENT BELOW (cc!=230)
test("\u012E\u0300", Locale.US, "\u012F\u0300"); // "I (w/ OGONEK)" followed by COMBINING GRAVE ACCENT (cc==230)
// I-dot tests (Turkish and Azeri)
// Remove dot_above in the sequence I + dot_above (Turkish and Azeri)
// Unless an I is before a dot_above, it turns into a dotless i (Turkish and Azeri)
// Supplementary character tests
//
// U+10400 ("\uD801\uDC00"): DESERET CAPITAL LETTER LONG I
// U+10401 ("\uD801\uDC01"): DESERET CAPITAL LETTER LONG E
// U+10402 ("\uD801\uDC02"): DESERET CAPITAL LETTER LONG A
// U+10428 ("\uD801\uDC28"): DESERET SMALL LETTER LONG I
// U+10429 ("\uD801\uDC29"): DESERET SMALL LETTER LONG E
// U+1042A ("\uD801\uDC2A"): DESERET SMALL LETTER LONG A
//
// valid code point tests:
test("\uD801\uDC00A\uD801\uDC01B\uD801\uDC02C", Locale.US, "\uD801\uDC28a\uD801\uDC29b\uD801\uDC2Ac");
// invalid code point tests:
test("\uD800\uD800\uD801A\uDC00\uDC00\uDC00B", Locale.US, "\uD800\uD800\uD801a\uDC00\uDC00\uDC00b");
}
throw new RuntimeException();
}
}
}