summaryrefslogtreecommitdiff
path: root/sapi/cli/tests/argv_mb.phpt
blob: e8c47f097258d4f7a5460c752254e5028b217810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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==