Annotation of embedaddon/php/ext/intl/tests/transliterator_create_inverse_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Transliterator::createInverse (basic)
3: --SKIPIF--
4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
5: --FILE--
6: <?php
7:
8: ini_set("intl.error_level", E_WARNING);
9:
10: $tr = Transliterator::create("Katakana-Latin");
11: $orstr = "オーシャンビュー";
12: $new_str = $tr->transliterate($orstr);
13:
14: $revtr = $tr->createInverse();
15: $recovstr = $revtr->transliterate($new_str);
16:
17: $revtr2 = transliterator_create_inverse($tr);
18: $recovstr2 = $revtr2->transliterate($new_str);
19:
20: echo $orstr,"\n";
21: echo $new_str,"\n";
22: echo $recovstr,"\n";
23:
24: var_dump(($orstr == $recovstr) == $recovstr2);
25:
26: echo "Done.\n";
27: --EXPECT--
28: オーシャンビュー
29: ōshanbyū
30: オーシャンビュー
31: bool(true)
32: Done.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>