[php-i18n-commits] cvs commit: php4/ext/mbstring/tests 025.phpt

アーカイブの一覧に戻る

Moriyoshi Koizumi moriy****@users*****
2002年 10月 7日 (月) 10:09:06 JST


moriyoshi    02/10/07 10:09:06

  Added:       ext/mbstring/tests 025.phpt
  Log:
  added a test case for mb_parse_str()
  
  Revision  Changes    Path
  1.1                  php4/ext/mbstring/tests/025.phpt
  
  Index: 025.phpt
  ===================================================================
  --TEST--
  parse_str
  --SKIPIF--
  <?php 
  	ini_set('include_path','.'); 
  	include('skipif.inc'); 
  ?>
  --INI--
  zlib.output_compression = Off
  arg_separator.input="\\"
  magic_quotes_gpc=on
  error_reporting=0
  mbstring.http_input=SJIS
  mbstring.internal_encoding=UTF-8
  mbstring.http_output=EUC-JP
  mbstring.encoding_translation=On
  --FILE--
  <?php
  ob_start("mb_output_handler");
  ?>
  <?php
  	$input_enc = 'Shift_JIS'; 
  	echo $input_enc.'>'.mb_internal_encoding().'>'.mb_http_output()."\n";
  	$str = "test1=".mb_convert_encoding( "〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓\\test2=abc\\test3=〓〓〓〓%5c〓〓〓〓〓〓%5c〓¨〓〓%5c〓〓〓〓〓〓%5c", $input_enc, 'EUC-JP' );
  	echo mb_convert_encoding( "$str\n", mb_internal_encoding(), $input_enc );
  	mb_parse_str( $str );
  ?>
  <?php
  	echo "test1='$test1'\n";
  	echo "test2='$test2'\n";
  	echo "test3='$test3'\n";
  	ob_end_flush();
  ?>
  
  --EXPECT--
  Shift_JIS>UTF-8>EUC-JP
  test1=〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓\test2=abc\test3=〓〓〓〓%5c〓〓〓〓〓〓%5c〓¨〓〓%5c〓〓〓〓〓〓%5c
  test1='〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓'
  test2='abc'
  test3='〓〓〓〓\〓〓〓〓〓〓\〓¨〓〓\〓〓〓〓〓〓\'
  
  
  



php-i18n-commits メーリングリストの案内
アーカイブの一覧に戻る