summaryrefslogtreecommitdiff
path: root/ext/iconv
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2014-12-21 19:07:19 +0100
committerOndřej Surý <ondrej@sury.org>2014-12-21 19:07:19 +0100
commit60fede4c90746ef3408ed27a15dd405b3a46a83b (patch)
tree068e6a8018345664b5d0e8d838995a4a3e97cc3d /ext/iconv
parentf40f1ce174885cd0f526c003eca3fa523e0ef269 (diff)
downloadphp-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.phpt19
-rw-r--r--ext/iconv/tests/iconv_basic_001.phpt19
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"