php-src/ext/mbstring/tests/mb_http_input.phpt
Moriyoshi Koizumi f05452fbcd Disable the test temporarily because "-d" flags in the command line doesn't
take effect under CGI mode. (See the relevant portion of cgi_main.c
that begins at line 996)
2003-08-03 13:58:20 +00:00

52 lines
952 B
PHP

--TEST--
mb_http_input()
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
(php_sapi_name()=='cgi') or die("skip sapi is not a cgi version");
die("skip disabled temporarily");
?>
--POST--
a=日本語0123456789日本語カタカナひらがな
--GET--
b=日本語0123456789日本語カタカナひらがな
--FILE--
<?php
// TODO: This is not a real test.... Need to change so that it does real testing
//$debug = true;
ini_set('include_path','.');
include_once('common.inc');
$ini = ini_get('mbstring.http_input');
// It must be url encoded....
// echo vars
echo $_POST['a']."\n";
echo $_GET['b']."\n";
// Get encoding
$enc = mb_http_input('P');
// check
if (empty($ini)) {
// Must be pass
if ($enc === 'pass') {
echo "OK\n";
}
else {
echo "NG\n";
}
}
else {
// Some encoding
echo "This heppens when php.ini-dist is not used\n";
}
?>
--EXPECT--
日本語0123456789日本語カタカナひらがな
日本語0123456789日本語カタカナひらがな
OK