]> granicus.if.org Git - php/commitdiff
add test
authorAntony Dovgal <tony2001@php.net>
Mon, 29 May 2006 20:31:48 +0000 (20:31 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 29 May 2006 20:31:48 +0000 (20:31 +0000)
ext/pcre/tests/invalid_utf8.phpt [new file with mode: 0644]

diff --git a/ext/pcre/tests/invalid_utf8.phpt b/ext/pcre/tests/invalid_utf8.phpt
new file mode 100644 (file)
index 0000000..df2de2d
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+preg_replace() and invalid UTF8
+--FILE--
+<?php
+
+$string = urldecode("search%e4"); 
+$result = preg_replace("#(&\#x*)([0-9A-F]+);*#iu","$1$2;",$string); 
+var_dump($result); 
+var_dump(preg_last_error());
+
+echo "Done\n";
+?>
+--EXPECT--     
+NULL
+int(4)
+Done