/*
* Copyright ( c ) 2005 , Oracle and / or its affiliates . All rights reserved .
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER .
*
* This code is free software ; you can redistribute it and / or modify it
* 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 Oracle , 500 Oracle Parkway , Redwood Shores , CA 94065 USA
* or visit www . oracle . com if you need additional information or have any
* questions .
*/
/*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright ( C ) 2003 - 2004 , International Business Machines Corporation and *
* others . All Rights Reserved . *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*/
import java.text.ParseException;
/**
* @ author ram
*
* To change the template for this generated type comment go to
* Window > Preferences > Java > Code Generation > Code and Comments
*/
public class TestData {
public static final char [][] unicodeIn ={
{
0 x0644, 0 x064A, 0 x0647, 0 x0645, 0 x0627, 0 x0628, 0 x062A, 0 x0643, 0 x0644,
0 x0645, 0 x0648, 0 x0634, 0 x0639, 0 x0631, 0 x0628, 0 x064A, 0 x061F
},
{
0 x4ED6, 0 x4EEC, 0 x4E3A, 0 x4EC0, 0 x4E48, 0 x4E0D, 0 x8BF4, 0 x4E2D, 0 x6587,
},
{
0 x0050, 0 x0072, 0 x006F, 0 x010D, 0 x0070, 0 x0072, 0 x006F, 0 x0073, 0 x0074,
0 x011B, 0 x006E, 0 x0065, 0 x006D, 0 x006C, 0 x0075, 0 x0076, 0 x00ED, 0 x010D,
0 x0065, 0 x0073, 0 x006B, 0 x0079,
},
{
0 x05DC, 0 x05DE, 0 x05D4, 0 x05D4, 0 x05DD, 0 x05E4, 0 x05E9, 0 x05D5, 0 x05D8,
0 x05DC, 0 x05D0, 0 x05DE, 0 x05D3, 0 x05D1, 0 x05E8, 0 x05D9, 0 x05DD, 0 x05E2,
0 x05D1, 0 x05E8, 0 x05D9, 0 x05EA,
},
{
0 x092F, 0 x0939, 0 x0932, 0 x094B, 0 x0917, 0 x0939, 0 x093F, 0 x0928, 0 x094D,
0 x0926, 0 x0940, 0 x0915, 0 x094D, 0 x092F, 0 x094B, 0 x0902, 0 x0928, 0 x0939,
0 x0940, 0 x0902, 0 x092C, 0 x094B, 0 x0932, 0 x0938, 0 x0915, 0 x0924, 0 x0947,
0 x0939, 0 x0948, 0 x0902,
},
{
0 x306A, 0 x305C, 0 x307F, 0 x3093, 0 x306A, 0 x65E5, 0 x672C, 0 x8A9E, 0 x3092,
0 x8A71, 0 x3057, 0 x3066, 0 x304F, 0 x308C, 0 x306A, 0 x3044, 0 x306E, 0 x304B,
},
/*
{
0 xC138 , 0 xACC4 , 0 xC758 , 0 xBAA8 , 0 xB4E0 , 0 xC0AC , 0 xB78C , 0 xB4E4 , 0 xC774 ,
0 xD55C , 0 xAD6D , 0 xC5B4 , 0 xB97C , 0 xC774 , 0 xD574 , 0 xD55C , 0 xB2E4 , 0 xBA74 ,
0 xC5BC , 0 xB9C8 , 0 xB098 , 0 xC88B , 0 xC744 , 0 xAE4C ,
} ,
*/
{
0 x043F, 0 x043E, 0 x0447, 0 x0435, 0 x043C, 0 x0443, 0 x0436, 0 x0435, 0 x043E,
0 x043D, 0 x0438, 0 x043D, 0 x0435, 0 x0433, 0 x043E, 0 x0432, 0 x043E, 0 x0440,
0 x044F, 0 x0442, 0 x043F, 0 x043E, 0 x0440, 0 x0443, 0 x0441, 0 x0441, 0 x043A,
0 x0438,
},
{
0 x0050, 0 x006F, 0 x0072, 0 x0071, 0 x0075, 0 x00E9, 0 x006E, 0 x006F, 0 x0070,
0 x0075, 0 x0065, 0 x0064, 0 x0065, 0 x006E, 0 x0073, 0 x0069, 0 x006D, 0 x0070,
0 x006C, 0 x0065, 0 x006D, 0 x0065, 0 x006E, 0 x0074, 0 x0065, 0 x0068, 0 x0061,
0 x0062, 0 x006C, 0 x0061, 0 x0072, 0 x0065, 0 x006E, 0 x0045, 0 x0073, 0 x0070,
0 x0061, 0 x00F1, 0 x006F, 0 x006C,
},
{
0 x4ED6, 0 x5011, 0 x7232, 0 x4EC0, 0 x9EBD, 0 x4E0D, 0 x8AAA, 0 x4E2D, 0 x6587,
},
{
0 x0054, 0 x1EA1, 0 x0069, 0 x0073, 0 x0061, 0 x006F, 0 x0068, 0 x1ECD, 0 x006B,
0 x0068, 0 x00F4, 0 x006E, 0 x0067, 0 x0074, 0 x0068, 0 x1EC3, 0 x0063, 0 x0068,
0 x1EC9, 0 x006E, 0 x00F3, 0 x0069, 0 x0074, 0 x0069, 0 x1EBF, 0 x006E, 0 x0067,
0 x0056, 0 x0069, 0 x1EC7, 0 x0074,
},
{
0 x0033, 0 x5E74, 0 x0042, 0 x7D44, 0 x91D1, 0 x516B, 0 x5148, 0 x751F,
},
{
0 x5B89, 0 x5BA4, 0 x5948, 0 x7F8E, 0 x6075, 0 x002D, 0 x0077, 0 x0069, 0 x0074,
0 x0068, 0 x002D, 0 x0053, 0 x0055, 0 x0050, 0 x0045, 0 x0052, 0 x002D, 0 x004D,
0 x004F, 0 x004E, 0 x004B, 0 x0045, 0 x0059, 0 x0053,
},
{
0 x0048, 0 x0065, 0 x006C, 0 x006C, 0 x006F, 0 x002D, 0 x0041, 0 x006E, 0 x006F,
0 x0074, 0 x0068, 0 x0065, 0 x0072, 0 x002D, 0 x0057, 0 x0061, 0 x0079, 0 x002D,
0 x305D, 0 x308C, 0 x305E, 0 x308C, 0 x306E, 0 x5834, 0 x6240,
},
{
0 x3072, 0 x3068, 0 x3064, 0 x5C4B, 0 x6839, 0 x306E, 0 x4E0B, 0 x0032,
},
{
0 x004D, 0 x0061, 0 x006A, 0 x0069, 0 x3067, 0 x004B, 0 x006F, 0 x0069, 0 x3059,
0 x308B, 0 x0035, 0 x79D2, 0 x524D,
},
{
0 x30D1, 0 x30D5, 0 x30A3, 0 x30FC, 0 x0064, 0 x0065, 0 x30EB, 0 x30F3, 0 x30D0,
},
{
0 x305D, 0 x306E, 0 x30B9, 0 x30D4, 0 x30FC, 0 x30C9, 0 x3067,
},
// test non-BMP code points
{
0 xD800, 0 xDF00, 0 xD800, 0 xDF01, 0 xD800, 0 xDF02, 0 xD800, 0 xDF03, 0 xD800, 0 xDF05,
0 xD800, 0 xDF06, 0 xD800, 0 xDF07, 0 xD800, 0 xDF09, 0 xD800, 0 xDF0A, 0 xD800, 0 xDF0B,
},
{
0 xD800, 0 xDF0D, 0 xD800, 0 xDF0C, 0 xD800, 0 xDF1E, 0 xD800, 0 xDF0F, 0 xD800, 0 xDF16,
0 xD800, 0 xDF15, 0 xD800, 0 xDF14, 0 xD800, 0 xDF12, 0 xD800, 0 xDF10, 0 xD800, 0 xDF20,
0 xD800, 0 xDF21,
},
// Greek
{
0 x03b5, 0 x03bb, 0 x03bb, 0 x03b7, 0 x03bd, 0 x03b9, 0 x03ba, 0 x03ac
},
// Maltese
{
0 x0062, 0 x006f, 0 x006e, 0 x0121, 0 x0075, 0 x0073, 0 x0061, 0 x0127,
0 x0127, 0 x0061
},
// Russian
{
0 x043f, 0 x043e, 0 x0447, 0 x0435, 0 x043c, 0 x0443, 0 x0436, 0 x0435,
0 x043e, 0 x043d, 0 x0438, 0 x043d, 0 x0435, 0 x0433, 0 x043e, 0 x0432,
0 x043e, 0 x0440, 0 x044f, 0 x0442, 0 x043f, 0 x043e, 0 x0440, 0 x0443,
0 x0441, 0 x0441, 0 x043a, 0 x0438
},
};
public static final String[] asciiIn = {
"xn--egbpdaj6bu4bxfgehfvwxn" ,
"xn--ihqwcrb4cv8a8dqg056pqjye" ,
"xn--Proprostnemluvesky-uyb24dma41a" ,
"xn--4dbcagdahymbxekheh6e0a7fei0b" ,
"xn--i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd" ,
"xn--n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa" ,
/* "xn--989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c",*/
"xn--b1abfaaepdrnnbgefbaDotcwatmq2g4l" ,
"xn--PorqunopuedensimplementehablarenEspaol-fmd56a" ,
"xn--ihqwctvzc91f659drss3x8bo0yb" ,
"xn--TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g" ,
"xn--3B-ww4c5e180e575a65lsy2b" ,
"xn---with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n" ,
"xn--Hello-Another-Way--fc4qua05auwb3674vfr0b" ,
"xn--2-u9tlzr9756bt3uc0v" ,
"xn--MajiKoi5-783gue6qz075azm5e" ,
"xn--de-jg4avhby1noc0d" ,
"xn--d9juau41awczczp" ,
"XN--097CCDEKGHQJK" ,
"XN--db8CBHEJLGH4E0AL" ,
"xn--hxargifdar" , // Greek
"xn--bonusaa-5bb1da" , // Maltese
"xn--b1abfaaepdrnnbgefbadotcwatmq2g4l" , // Russian (Cyrillic)
};
public static final String[] domainNames = {
"slip129-37-118-146.nc.us.ibm.net" ,
"saratoga.pe.utexas.edu" ,
"dial-120-45.ots.utexas.edu" ,
"woo-085.dorms.waller.net" ,
"hd30-049.hil.compuserve.com" ,
"pem203-31.pe.ttu.edu" ,
"56K-227.MaxTNT3.pdq.net" ,
"dial-36-2.ots.utexas.edu" ,
"slip129-37-23-152.ga.us.ibm.net" ,
"ts45ip119.cadvision.com" ,
"sdn-ts-004txaustP05.dialsprint.net" ,
"bar-tnt1s66.erols.com" ,
"101.st-louis-15.mo.dial-access.att.net" ,
"h92-245.Arco.COM" ,
"dial-13-2.ots.utexas.edu" ,
"net-redynet29.datamarkets.com.ar" ,
"ccs-shiva28.reacciun.net.ve" ,
"7.houston-11.tx.dial-access.att.net" ,
"ingw129-37-120-26.mo.us.ibm.net" ,
"dialup6.austintx.com" ,
"dns2.tpao.gov.tr" ,
"slip129-37-119-194.nc.us.ibm.net" ,
"cs7.dillons.co.uk.203.119.193.in-addr.arpa" ,
"swprd1.innovplace.saskatoon.sk.ca" ,
"bikini.bologna.maraut.it" ,
"node91.subnet159-198-79.baxter.com" ,
"cust19.max5.new-york.ny.ms.uu.net" ,
"balexander.slip.andrew.cmu.edu" ,
"pool029.max2.denver.co.dynip.alter.net" ,
"cust49.max9.new-york.ny.ms.uu.net" ,
"s61.abq-dialin2.hollyberry.com" ,
};
public static final String[] domainNames1Uni = {
"\u0917\u0928\u0947\u0936.sanjose.ibm.com" ,
"www.\u0121.com" ,
//"www.\u00E0\u00B3\u00AF.com",
"www.\u00C2\u00A4.com" ,
"www.\u00C2\u00A3.com" ,
// "\\u0025", //'%' (0x0025) produces U_IDNA_STD3_ASCII_RULES_ERROR
// "\\u005C\\u005C", //'\' (0x005C) produces U_IDNA_STD3_ASCII_RULES_ERROR
//"@",
//"\\u002F",
//"www.\\u0021.com",
//"www.\\u0024.com",
//"\\u003f",
// These yeild U_IDNA_PROHIBITED_ERROR
//"\\u00CF\\u0082.com",
//"\\u00CE\\u00B2\\u00C3\\u009Fss.com",
//"\\u00E2\\u0098\\u00BA.com",
"\u00C3\u00BC.com"
};
public static final String[] domainNamesToASCIIOut = {
"xn--31b8a2bwd.sanjose.ibm.com" ,
"www.xn--vea.com" ,
//"www.xn--3 -iia80t.com",
"www.xn--bba7j.com" ,
"www.xn--9a9j.com" ,
// "\u0025",
// "\u005C\u005C",
// "@",
// "\u002F",
// "www.\u0021.com",
// "www.\u0024.com",
// "\u003f",
"xn--14-ria7423a.com"
};
public static final String[] domainNamesToUnicodeOut = {
"\u0917\u0928\u0947\u0936.sanjose.ibm.com" ,
"www.\u0121.com" ,
//"www.\u00E0\u0033\u0020\u0304.com",
"www.\u00E2\u00A4.com" ,
"www.\u00E2\u00A3.com" ,
// "\u0025",
// "\u005C\u005C",
// "@",
// "\u002F",
// "www.\u0021.com",
// "www.\u0024.com",
// "\u003f",
"\u00E3\u0031\u2044\u0034.com"
};
public static class ErrorCase{
public char [] unicode;
public String ascii;
public Exception expected;
public boolean useSTD3ASCIIRules;
public boolean testToUnicode;
public boolean testLabel;
ErrorCase(char [] uniIn, String asciiIn, Exception ex,
boolean std3, boolean testToUni, boolean testlabel){
unicode = uniIn;
ascii = asciiIn;
expected = ex;
useSTD3ASCIIRules = std3;
testToUnicode = testToUni;
testLabel = testlabel;
}
};
public static final ErrorCase[] errorCases = {
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 xC138, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 x070F,/*prohibited*/
0 xD55C, 0 xAD6D, 0 xC5B4, 0 xB97C, 0 xC774, 0 xD574, 0 xD55C, 0 xB2E4, 0 xBA74,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.XN--8mb5595fsoa28orucya378bqre2tcwop06c5qbw82a1rffmae0361dea96b.com" ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 ),
false , true , true ),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 xC138, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 x0221, 0 x0234/*Unassigned code points*/,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.XN--6lA2Bz548Fj1GuA391Bf1Gb1N59Ab29A7iA.com" ,
new ParseException("StringPrep UNASSIGNED_ERROR" , -1 ),
false , true , true
),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 xC138, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 x0644, 0 x064A, 0 x0647,/*Arabic code points. Cannot mix RTL with LTR*/
0 xD55C, 0 xAD6D, 0 xC5B4, 0 xB97C, 0 xC774, 0 xD574, 0 xD55C, 0 xB2E4, 0 xBA74,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.xn--ghBGI4851OiyA33VqrD6Az86C4qF83CtRv93D5xBk15AzfG0nAgA0578DeA71C.com" ,
new ParseException("StringPrep CHECK_BIDI_ERROR" , -1 ),
false , true , true
),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
/* labels cannot begin with an HYPHEN */
0 x002D, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 x002E,
0 xD55C, 0 xAD6D, 0 xC5B4, 0 xB97C, 0 xC774, 0 xD574, 0 xD55C, 0 xB2E4, 0 xBA74,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.xn----b95Ew8SqA315Ao5FbuMlnNmhA.com" ,
new ParseException("StringPrep STD3_ASCII_RULES_ERROR" , -1 ),
true , true , false
),
new ErrorCase( new char []{
/* correct ACE-prefix followed by unicode */
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 x0078, 0 x006e, 0 x002d,0 x002d, /* ACE Prefix */
0 x002D, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 x002D,
0 xD55C, 0 xAD6D, 0 xC5B4, 0 xB97C, 0 xC774, 0 xD574, 0 xD55C, 0 xB2E4, 0 xBA74,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
/* wrong ACE-prefix followed by valid ACE-encoded ASCII */
"www.XY-----b91I0V65S96C2A355Cw1E5yCeQr19CsnP1mFfmAE0361DeA96B.com" ,
new ParseException("StringPrep ACE_PREFIX_ERROR" , -1 ),
false , false , false
),
/* cannot verify U_IDNA_VERIFICATION_ERROR */
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 xC138, 0 xACC4, 0 xC758, 0 xBAA8, 0 xB4E0, 0 xC0AC, 0 xB78C, 0 xB4E4, 0 xC774,
0 xD55C, 0 xAD6D, 0 xC5B4, 0 xB97C, 0 xC774, 0 xD574, 0 xD55C, 0 xB2E4, 0 xBA74,
0 xC5BC, 0 xB9C8, 0 xB098, 0 xC88B, 0 xC744, 0 xAE4C,
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.xn--989AoMsVi5E83Db1D2A355Cv1E0vAk1DwRv93D5xBh15A0Dt30A5JpSD879Ccm6FeA98C.com" ,
new ParseException("StringPrep LABEL_TOO_LONG_ERROR" , -1 ),
false , true , true
),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, /* www. */
0 x0030, 0 x0644, 0 x064A, 0 x0647, 0 x0031, /* Arabic code points squashed between EN codepoints */
0 x002e, 0 x0063, 0 x006f, 0 x006d, /* com. */
},
"www.xn--01-tvdmo.com" ,
new ParseException("StringPrep CHECK_BIDI_ERROR" , -1 ),
false , true , true
),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, // www.
0 x206C, 0 x0644, 0 x064A, 0 x0647, 0 x206D, // Arabic code points squashed between BN codepoints
0 x002e, 0 x0063, 0 x006f, 0 x006d, // com.
},
"www.XN--ghbgi278xia.com" ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 ),
false , true , true
),
new ErrorCase( new char [] {
0 x0077, 0 x0077, 0 x0077, 0 x002e, // www.
0 x002D, 0 x0041, 0 x0042, 0 x0043, 0 x0044, 0 x0045, // HYPHEN at the start of label
0 x002e, 0 x0063, 0 x006f, 0 x006d, // com.
},
"www.-abcde.com" ,
new ParseException("StringPrep STD3_ASCII_RULES_ERROR" , -1 ),
true , true , false
),
new ErrorCase( new char [] {
0 x0077, 0 x0077, 0 x0077, 0 x002e, // www.
0 x0041, 0 x0042, 0 x0043, 0 x0044, 0 x0045,0 x002D, // HYPHEN at the end of the label
0 x002e, 0 x0063, 0 x006f, 0 x006d, // com.
},
"www.abcde-.com" ,
new ParseException("StringPrep STD3_ASCII_RULES_ERROR" , -1 ),
true , true , false
),
new ErrorCase( new char []{
0 x0077, 0 x0077, 0 x0077, 0 x002e, // www.
0 x0041, 0 x0042, 0 x0043, 0 x0044, 0 x0045,0 x0040, // Containing non LDH code point
0 x002e, 0 x0063, 0 x006f, 0 x006d, // com.
},
"www.abcde@.com" ,
new ParseException("StringPrep STD3_ASCII_RULES_ERROR" , -1 ),
true , true , false
),
};
public static final class ConformanceTestCase{
String comment;
String input;
String output;
String profile;
int flags;
Exception expected;
private static byte [] getBytes(String in){
if (in==null ){
return null ;
}
byte [] bytes = new byte [in.length()];
for (int i=0 ; i < in.length();i++){
bytes[i] = (byte )in.charAt(i);
}
return bytes;
}
ConformanceTestCase(String comt, String in, String out,
String prof, int flg, Exception ex)
{
try {
comment = comt;
byte [] bytes = getBytes(in);
input = new String(bytes,"UTF-8" );
bytes = getBytes(out);
output = (bytes==null )? null : new String(bytes,"UTF-8" );
profile = prof;
flags = flg;
expected = ex;
}catch (Exception e){
e.printStackTrace();
throw new RuntimeException();
}
}
}
public static final ConformanceTestCase[] conformanceTestCases =
{
new ConformanceTestCase(
"Case folding ASCII U+0043 U+0041 U+0046 U+0045" ,
"\u0043\u0041\u0046\u0045" , "\u0063\u0061\u0066\u0065" ,
"Nameprep" , 0 ,
null
),
new ConformanceTestCase(
"Case folding 8bit U+00DF (german sharp s)" ,
"\u00C3\u009F" , "\u0073\u0073" ,
"Nameprep" , 0 ,
null
),
new ConformanceTestCase(
"Non-ASCII multibyte space character U+1680" ,
"\u00E1\u009A\u0080" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Non-ASCII 8bit control character U+0085" ,
"\u00C2\u0085" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Non-ASCII multibyte control character U+180E" ,
"\u00E1\u00A0\u008E" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Non-ASCII control character U+1D175" ,
"\u00F0\u009D\u0085\u00B5" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Plane 0 private use character U+F123" ,
"\u00EF\u0084\u00A3" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Plane 15 private use character U+F1234" ,
"\u00F3\u00B1\u0088\u00B4" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Plane 16 private use character U+10F234" ,
"\u00F4\u008F\u0088\u00B4" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Non-character code point U+8FFFE" ,
"\u00F2\u008F\u00BF\u00BE" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Non-character code point U+10FFFF" ,
"\u00F4\u008F\u00BF\u00BF" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
/*
{
" Surrogate code U + DF42 " ,
" \ u00ED \ u00BD \ u0082 " , null , " Nameprep " , InternationalizedDomainNames . DEFAULT ,
U_IDNA_PROHIBITED_ERROR
} ,
*/
new ConformanceTestCase(
"Non-plain text character U+FFFD" ,
"\u00EF\u00BF\u00BD" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Ideographic description character U+2FF5" ,
"\u00E2\u00BF\u00B5" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Display property character U+0341" ,
"\u00CD\u0081" , "\u00CC\u0081" ,
"Nameprep" , 0 ,
null
),
new ConformanceTestCase(
"Left-to-right mark U+200E" ,
"\u00E2\u0080\u008E" , "\u00CC\u0081" ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Deprecated U+202A" ,
"\u00E2\u0080\u00AA" , "\u00CC\u0081" ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Language tagging character U+E0001" ,
"\u00F3\u00A0\u0080\u0081" , "\u00CC\u0081" ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Language tagging character U+E0042" ,
"\u00F3\u00A0\u0081\u0082" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep PROHIBITED_ERROR" , -1 )
),
new ConformanceTestCase(
"Bidi: RandALCat character U+05BE and LCat characters" ,
"\u0066\u006F\u006F\u00D6\u00BE\u0062\u0061\u0072" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep CHECK_BIDI_ERROR" , -1 )
),
new ConformanceTestCase(
"Bidi: RandALCat character U+FD50 and LCat characters" ,
"\u0066\u006F\u006F\u00EF\u00B5\u0090\u0062\u0061\u0072" , null ,
"Nameprep" ,0 ,
new ParseException("StringPrep CHECK_BIDI_ERROR" , -1 )
),
new ConformanceTestCase(
"Bidi: RandALCat character U+FB38 and LCat characters" ,
"\u0066\u006F\u006F\u00EF\u00B9\u00B6\u0062\u0061\u0072" , "\u0066\u006F\u006F \u00d9\u008e\u0062\u0061\u0072" ,
"Nameprep" , 0 ,
null
),
new ConformanceTestCase(
"Bidi: RandALCat without trailing RandALCat U+0627 U+0031" ,
"\u00D8\u00A7\u0031" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep CHECK_BIDI_ERROR" , -1 )
),
new ConformanceTestCase(
"Bidi: RandALCat character U+0627 U+0031 U+0628" ,
"\u00D8\u00A7\u0031\u00D8\u00A8" , "\u00D8\u00A7\u0031\u00D8\u00A8" ,
"Nameprep" , 0 ,
null
),
new ConformanceTestCase(
"Unassigned code point U+E0002" ,
"\u00F3\u00A0\u0080\u0082" , null ,
"Nameprep" , 0 ,
new ParseException("StringPrep UNASSIGNED_ERROR" , -1 )
),
/* // Invalid UTF-8
{
" Larger test ( shrinking ) " ,
" X \ u00C2 \ u00AD \ u00C3 \ u00DF \ u00C4 \ u00B0 \ u00E2 \ u0084 \ u00A1 \ u006a \ u00cc \ u008c \ u00c2 \ u00a0 \ u00c2 "
" \ u00aa \ u00ce \ u00b0 \ u00e2 \ u0080 \ u0080 " , " xssi \ u00cc \ u0087 " " tel \ u00c7 \ u00b0 a \ u00ce \ u00b0 " ,
" Nameprep " ,
InternationalizedDomainNames . DEFAULT , U_ZERO_ERROR
} ,
{
" Larger test ( expanding ) " ,
" X \ u00C3 \ u00DF \ u00e3 \ u008c \ u0096 \ u00C4 \ u00B0 \ u00E2 \ u0084 \ u00A1 \ u00E2 \ u0092 \ u009F \ u00E3 \ u008c \ u0080 " ,
" xss \ u00e3 \ u0082 \ u00ad \ u00e3 \ u0083 \ u00ad \ u00e3 \ u0083 \ u00a1 \ u00e3 \ u0083 \ u00bc \ u00e3 \ u0083 \ u0088 "
" \ u00e3 \ u0083 \ u00ab " " i \ u00cc \ u0087 " " tel \ u0028 " " d \ u0029 \ u00e3 \ u0082 \ u00a2 \ u00e3 \ u0083 \ u0091 "
" \ u00e3 \ u0083 \ u00bc \ u00e3 \ u0083 \ u0088 "
" Nameprep " ,
InternationalizedDomainNames . DEFAULT , U_ZERO_ERROR
} ,
*/
};
}
Messung V0.5 in Prozent C=97 H=99 G=97
¤ Dauer der Verarbeitung: 0.10 Sekunden
¤
*© Formatika GbR, Deutschland