Made Punycode tests more readable

darcs-hash:20080120144023-a4fee-eb86482338c8eb86bca473cdb42d1446df90cc3c
This commit is contained in:
Henning Guenther 2008-01-20 06:40:23 -08:00
parent 77d41d7cbb
commit c201774307

View File

@ -151,37 +151,37 @@ punycodeTests = TestList $ map test $
(map (fromIntegral.ord) "74h") (map (fromIntegral.ord) "74h")
-- taken from http://tools.ietf.org/html/rfc3492#section-7 -- taken from http://tools.ietf.org/html/rfc3492#section-7
-- Arabic (Egyptian) -- Arabic (Egyptian)
,punyTest "\x644\x64a\x647\x645\x627\x628\x62a\x643\x644\x645\x648\x634\x639\x631\x628\x64a\x61f" ,punyTest "ليهمابتكلموشعربي؟"
"egbpdaj6bu4bxfgehfvwxn" "egbpdaj6bu4bxfgehfvwxn"
-- Chinese (simplified) -- Chinese (simplified)
,punyTest "\x4ed6\x4eec\x4e3a\x4ec0\x4e48\x4e0d\x8bf4\x4e2d\x6587" ,punyTest "他们为什么不说中文"
"ihqwcrb4cv8a8dqg056pqjye" "ihqwcrb4cv8a8dqg056pqjye"
-- Chinese (traditional) -- Chinese (traditional)
,punyTest "\x4ed6\x5011\x7232\x4ec0\x9ebd\x4e0d\x8aaa\x4e2d\x6587" ,punyTest "他們爲什麽不說中文"
"ihqwctvzc91f659drss3x8bo0yb" "ihqwctvzc91f659drss3x8bo0yb"
-- Czech -- Czech
,punyTest "\x050\x072\x06f\x10d\x070\x072\x06f\x073\x074\x11b\x06e\x065\x06d\x06c\x075\x076\x0ed\x10d\x065\x073\x06b\x079" ,punyTest "Pročprostěnemluvíčesky"
"Proprostnemluvesky-uyb24dma41a" "Proprostnemluvesky-uyb24dma41a"
-- Hebrew -- Hebrew
,punyTest "\x5dc\x5de\x5d4\x5d4\x5dd\x5e4\x5e9\x5d5\x5d8\x5dc\x5d0\x5de\x5d3\x5d1\x5e8\x5d9\x5dd\x5e2\x5d1\x5e8\x5d9\x5ea" ,punyTest "למההםפשוטלאמדבריםעברית"
"4dbcagdahymbxekheh6e0a7fei0b" "4dbcagdahymbxekheh6e0a7fei0b"
-- Hindi (Devanagari) -- Hindi (Devanagari)
,punyTest "\x92F\x939\x932\x94B\x917\x939\x93F\x928\x94D\x926\x940\x915\x94D\x92F\x94B\x902\x928\x939\x940\x902\x92C\x94B\x932\x938\x915\x924\x947\x939\x948\x902" ,punyTest "\x92F\x939\x932\x94B\x917\x939\x93F\x928\x94D\x926\x940\x915\x94D\x92F\x94B\x902\x928\x939\x940\x902\x92C\x94B\x932\x938\x915\x924\x947\x939\x948\x902"
"i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd" "i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd"
-- Japanese (kanji and hiragana) -- Japanese (kanji and hiragana)
,punyTest "\x306A\x305C\x307F\x3093\x306A\x65E5\x672C\x8A9E\x3092\x8A71\x3057\x3066\x304F\x308C\x306A\x3044\x306E\x304B" ,punyTest "なぜみんな日本語を話してくれないのか"
"n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa" "n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa"
-- Korean (Hangul syllables) -- Korean (Hangul syllables)
,punyTest "\xC138\xACC4\xC758\xBAA8\xB4E0\xC0AC\xB78C\xB4E4\xC774\xD55C\xAD6D\xC5B4\xB97C\xC774\xD574\xD55C\xB2E4\xBA74\xC5BC\xB9C8\xB098\xC88B\xC744\xAE4C" ,punyTest "세계의모든사람들이한국어를이해한다면얼마나좋을까"
"989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c" "989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5jpsd879ccm6fea98c"
-- Russian (Cyrillic) -- Russian (Cyrillic)
,punyTest "\x43F\x43E\x447\x435\x43C\x443\x436\x435\x43E\x43D\x438\x43D\x435\x433\x43E\x432\x43E\x440\x44F\x442\x43F\x43E\x440\x443\x441\x441\x43A\x438" ,punyTest "почемужеонинеговорятпорусски"
"b1abfaaepdrnnbgefbadotcwatmq2g4l" -- I think the ietf made a mistake there "b1abfaaepdrnnbgefbadotcwatmq2g4l" -- I think the ietf made a mistake there
-- Spanish -- Spanish
,punyTest "\x50\x6F\x72\x71\x75\xE9\x6E\x6F\x70\x75\x65\x64\x65\x6E\x73\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x65\x68\x61\x62\x6C\x61\x72\x65\x6E\x45\x73\x70\x61\xF1\x6F\x6C" ,punyTest "PorquénopuedensimplementehablarenEspañol"
"PorqunopuedensimplementehablarenEspaol-fmd56a" "PorqunopuedensimplementehablarenEspaol-fmd56a"
-- Vietnamese -- Vietnamese
,punyTest "\x0054\x1EA1\x0069\x0073\x0061\x006F\x0068\x1ECD\x006B\x0068\x00F4\x006E\x0067\x0074\x0068\x1EC3\x0063\x0068\x1EC9\x006E\x00F3\x0069\x0074\x0069\x1EBF\x006E\x0067\x0056\x0069\x1EC7\x0074" ,punyTest "TạisaohọkhôngthểchỉnóitiếngViệt"
"TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g" "TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g"
] ]
where punyTest str outp = EncodingTest punycode str (map (fromIntegral.ord) outp) where punyTest str outp = EncodingTest punycode str (map (fromIntegral.ord) outp)