svn: /php/php-src/trunk/ext/pcre/tests/ bug52971.phpt
| From: | Felipe Pena | Date: | Mon, 15 Nov 2010 18:46:59 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/pcre/tests/ bug52971.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-63843@lists.php.net to get a copy of this message | ||
felipe Mon, 15 Nov 2010 18:46:59 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305380
Log:
- Added missing test
Changed paths:
A php/php-src/trunk/ext/pcre/tests/bug52971.phpt
Added: php/php-src/trunk/ext/pcre/tests/bug52971.phpt
===================================================================
--- php/php-src/trunk/ext/pcre/tests/bug52971.phpt (rev 0)
+++ php/php-src/trunk/ext/pcre/tests/bug52971.phpt 2010-11-15 18:46:59 UTC (rev 305380)
@@ -0,0 +1,43 @@
+--TEST--
+Bug #52971 (PCRE-Meta-Characters not working with utf-8)
+--SKIPIF--
+<?php if ((double)PCRE_VERSION < 8.1) die('skip PCRE_VERSION >= 8.1 is
required!'); ?>
+--FILE--
+<?php
+
+$message = 'Der ist ein Süßwasserpool Süsswasserpool ... verschiedene
Wassersportmöglichkeiten bei ...';
+
+$pattern = '/\bwasser/iu';
+preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
+var_dump($match);
+
+$pattern = '/[^\w]wasser/iu';
+preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
+var_dump($match);
+
+?>
+--EXPECTF--
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(6) "Wasser"
+ [1]=>
+ int(61)
+ }
+ }
+}
+array(1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ array(2) {
+ [0]=>
+ string(7) " Wasser"
+ [1]=>
+ int(60)
+ }
+ }
+}
Property changes on: php/php-src/trunk/ext/pcre/tests/bug52971.phpt
___________________________________________________________________
Added: svn:keywords
+ Id Rev Revision
Added: svn:eol-style
+ native