diff options
author | Ondřej Surý <ondrej@sury.org> | 2014-12-21 19:07:19 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2014-12-21 19:07:19 +0100 |
commit | 60fede4c90746ef3408ed27a15dd405b3a46a83b (patch) | |
tree | 068e6a8018345664b5d0e8d838995a4a3e97cc3d /ext/iconv | |
parent | f40f1ce174885cd0f526c003eca3fa523e0ef269 (diff) | |
download | php-60fede4c90746ef3408ed27a15dd405b3a46a83b.tar.gz |
New upstream version 5.6.4+dfsgupstream/5.6.4+dfsg
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/tests/iconv_basic_001-win32.phpt | 19 | ||||
-rw-r--r-- | ext/iconv/tests/iconv_basic_001.phpt | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/ext/iconv/tests/iconv_basic_001-win32.phpt b/ext/iconv/tests/iconv_basic_001-win32.phpt new file mode 100644 index 000000000..59a3dbd86 --- /dev/null +++ b/ext/iconv/tests/iconv_basic_001-win32.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test the basics to function iconv. +--CREDITS-- +Rodrigo Prado de Jesus <royopa [at] gmail [dot] com> +--SKIPIF-- +<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?> +<?php if(substr(PHP_OS, 0, 3) != 'WIN' ) {die('skip windows only test');} ?> +--FILE-- +<?php +$in_charset = 'UTF-8'; +$out_charset = 'ASCII//TRANSLIT'; +$string_to_translate = 'Žluťoučký kůň\n'; + +$string_out = iconv($in_charset, $out_charset, $string_to_translate); + +var_dump($string_out); +?> +--EXPECT-- +string(16) "Zlutouck'y kun\n" diff --git a/ext/iconv/tests/iconv_basic_001.phpt b/ext/iconv/tests/iconv_basic_001.phpt new file mode 100644 index 000000000..6fcb5dbe8 --- /dev/null +++ b/ext/iconv/tests/iconv_basic_001.phpt @@ -0,0 +1,19 @@ +--TEST-- +Test the basics to function iconv. +--CREDITS-- +Rodrigo Prado de Jesus <royopa [at] gmail [dot] com> +--SKIPIF-- +<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?> +<?php if(substr(PHP_OS, 0, 3) == 'WIN' ) {die('skip not for windows');} ?> +--FILE-- +<?php +$in_charset = 'UTF-8'; +$out_charset = 'ASCII//TRANSLIT'; +$string_to_translate = 'Žluťoučký kůň\n'; + +$string_out = iconv($in_charset, $out_charset, $string_to_translate); + +var_dump($string_out); +?> +--EXPECT-- +string(15) "Zlutoucky kun\n" |