From: Nuno Lopes Date: Sat, 8 Mar 2008 11:50:20 +0000 (+0000) Subject: add new tests X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0d0a7a432aff15332c1e003e2db8685dcf00ccee;p=php add new tests --- diff --git a/ext/pcre/tests/007.phpt b/ext/pcre/tests/007.phpt new file mode 100644 index 0000000000..776bec27b2 --- /dev/null +++ b/ext/pcre/tests/007.phpt @@ -0,0 +1,59 @@ +--TEST-- +preg_replace_callback() with callback that modifies subject string +--SKIPIF-- + +--FILE-- + +--EXPECT-- +array(1) { + [0]=> + string(1) "o" +} +array(1) { + [0]=> + string(1) "l" +} +array(1) { + [0]=> + string(1) "a" +} +array(1) { + [0]=> + string(1) "1" +} +array(1) { + [0]=> + string(1) "2" +} +array(1) { + [0]=> + string(1) "3" +} +string(6) "ola123" +string(6) "olaÿ23" +bool(true) +NULL +bool(true) +Done! diff --git a/ext/pcre/tests/invalid_utf8_offset.phpt b/ext/pcre/tests/invalid_utf8_offset.phpt new file mode 100644 index 0000000000..4e0d40caf4 --- /dev/null +++ b/ext/pcre/tests/invalid_utf8_offset.phpt @@ -0,0 +1,35 @@ +--TEST-- +preg_replace() and invalid UTF8 offset +--SKIPIF-- + +--FILE-- + +--EXPECT-- +int(0) +array(0) { +} +bool(true) +int(1) +array(1) { + [0]=> + string(28) " uma string utf8 bem formada" +} +bool(true) +Done