Annotation of embedaddon/php/ext/intl/tests/transliterator_transliterate_variant1.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: transliterator_transliterate (variant 1, non-transliterator 1st arg)
! 3: --SKIPIF--
! 4: <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
! 5: --FILE--
! 6: <?php
! 7: ini_set("intl.error_level", E_WARNING);
! 8: //exec('pause');
! 9: $str = " o";
! 10: echo transliterator_transliterate("[\p{White_Space}] hex", $str), "\n";
! 11:
! 12: echo transliterator_transliterate("\x8F", $str), "\n";
! 13: echo intl_get_error_message(), "\n";
! 14:
! 15: class A {
! 16: function __toString() { return "inexistant id"; }
! 17: }
! 18:
! 19: echo transliterator_transliterate(new A(), $str), "\n";
! 20: echo intl_get_error_message(), "\n";
! 21:
! 22: echo "Done.\n";
! 23: --EXPECTF--
! 24: \u0020o
! 25:
! 26: Warning: transliterator_transliterate(): String conversion of id to UTF-16 failed in %s on line %d
! 27:
! 28: Warning: transliterator_transliterate(): Could not create transliterator with ID %s
! 29:
! 30: String conversion of id to UTF-16 failed: U_INVALID_CHAR_FOUND
! 31:
! 32: Warning: transliterator_transliterate(): transliterator_create: unable to open ICU transliterator with id "inexistant id" in %s on line %d
! 33:
! 34: Warning: transliterator_transliterate(): Could not create transliterator with ID "inexistant id" (transliterator_create: unable to open ICU transliterator with id "inexistant id": U_INVALID_ID) in %s on line %d
! 35:
! 36: transliterator_create: unable to open ICU transliterator with id "inexistant id": U_INVALID_ID
! 37: Done.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>