summaryrefslogtreecommitdiff
path: root/sapi/cli/tests/argv_mb.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cli/tests/argv_mb.phpt')
-rw-r--r--sapi/cli/tests/argv_mb.phpt38
1 files changed, 38 insertions, 0 deletions
diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt
new file mode 100644
index 0000000000..e8c47f0972
--- /dev/null
+++ b/sapi/cli/tests/argv_mb.phpt
@@ -0,0 +1,38 @@
+--TEST--
+Test basic argv multibyte API integration
+--SKIPIF--
+<?php
+include "skipif.inc";
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die ("skip only for Windows");
+}
+?>
+--FILE--
+<?php
+
+$php = getenv('TEST_PHP_EXECUTABLE');
+
+$argv_fl = dirname(__FILE__) . DIRECTORY_SEPARATOR . "argv_test.php";
+file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>");
+
+var_dump(`$php -n $argv_fl 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`);
+
+@unlink($argv_fl);
+
+?>
+==DONE==
+--EXPECTF--
+string(%d) "array(%d) {
+ [0]=>
+ string(%d) "%sargv_test.php"
+ [1]=>
+ string(18) "多字节字符串"
+ [2]=>
+ string(27) "マルチバイト文字列"
+ [3]=>
+ string(38) "многобайтоваястрока"
+ [4]=>
+ string(15) "flerbytesträng"
+}
+"
+==DONE==