diff options
Diffstat (limited to 'ext/pcre/tests')
| -rw-r--r-- | ext/pcre/tests/bug20528.phpt | 24 | ||||
| -rw-r--r-- | ext/pcre/tests/bug21732.phpt | 29 | ||||
| -rw-r--r-- | ext/pcre/tests/bug26927.phpt | 11 | ||||
| -rw-r--r-- | ext/pcre/tests/bug27103.phpt | 37 | ||||
| -rw-r--r-- | ext/pcre/tests/bug33200.phpt | 12 | ||||
| -rw-r--r-- | ext/pcre/tests/pcre_count.phpt | 40 |
6 files changed, 0 insertions, 153 deletions
diff --git a/ext/pcre/tests/bug20528.phpt b/ext/pcre/tests/bug20528.phpt deleted file mode 100644 index 8182fd9bfe..0000000000 --- a/ext/pcre/tests/bug20528.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #20528 (preg_split() drops characters (re-opens Bug #15413)) ---FILE-- -<?php - $data = '(#11/19/2002#)'; - var_dump(preg_split('/\b/', $data)); -?> ---EXPECT-- -array(7) { - [0]=> - string(2) "(#" - [1]=> - string(2) "11" - [2]=> - string(1) "/" - [3]=> - string(2) "19" - [4]=> - string(1) "/" - [5]=> - string(4) "2002" - [6]=> - string(2) "#)" -} diff --git a/ext/pcre/tests/bug21732.phpt b/ext/pcre/tests/bug21732.phpt deleted file mode 100644 index 3dfc41e19f..0000000000 --- a/ext/pcre/tests/bug21732.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Bug #21732 (preg_replace() segfaults with invalid parameters) ---INI-- -error_reporting=0 ---FILE-- -<?php -class foo { - function cb($param) { - var_dump($param); - return "yes!"; - } -} - -var_dump(preg_replace('', array(), '')); -var_dump(preg_replace_callback("/(ab)(cd)(e)/", array(new foo(), "cb"), 'abcde')); -?> ---EXPECT-- -bool(false) -array(4) { - [0]=> - string(5) "abcde" - [1]=> - string(2) "ab" - [2]=> - string(2) "cd" - [3]=> - string(1) "e" -} -string(4) "yes!" diff --git a/ext/pcre/tests/bug26927.phpt b/ext/pcre/tests/bug26927.phpt deleted file mode 100644 index 25b6b2e572..0000000000 --- a/ext/pcre/tests/bug26927.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #26927 (preg_quote() does not escape \0) ---FILE-- -<?php - $str = "a\000b"; - $str_quoted = preg_quote($str); - var_dump(preg_match("!{$str_quoted}!", $str), $str_quoted); -?> ---EXPECT-- -int(1) -string(4) "a\0b" diff --git a/ext/pcre/tests/bug27103.phpt b/ext/pcre/tests/bug27103.phpt deleted file mode 100644 index 185225d310..0000000000 --- a/ext/pcre/tests/bug27103.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Bug #27103 (preg_split('//u') incorrectly splits UTF-8 strings into octets) ---FILE-- -<?php -function iter($ar) -{ - foreach ($ar as $c) { - echo htmlentities($c, 0, "UTF-8"), ": ", strlen($c), "\n"; - } -} -$teststr = "\xe2\x82\xac hi there"; -iter(preg_split('//u', $teststr, -1, PREG_SPLIT_NO_EMPTY)); -preg_match_all('/./u', $teststr, $matches); -iter($matches[0]); -?> ---EXPECT-- -€: 3 - : 1 -h: 1 -i: 1 - : 1 -t: 1 -h: 1 -e: 1 -r: 1 -e: 1 -€: 3 - : 1 -h: 1 -i: 1 - : 1 -t: 1 -h: 1 -e: 1 -r: 1 -e: 1 - diff --git a/ext/pcre/tests/bug33200.phpt b/ext/pcre/tests/bug33200.phpt deleted file mode 100644 index b00b72ac28..0000000000 --- a/ext/pcre/tests/bug33200.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #33200 (magic_quotes_sybase = On makes 'e' modifier misbehave) ---INI-- -magic_quotes_sybase=1 ---FILE-- -<?php -$str = 'some \'$sample\' text'; -$str = preg_replace("/(some.*text)/e", "strtoupper('\\1')", $str); -echo $str; -?> ---EXPECT-- -SOME '$SAMPLE' TEXT diff --git a/ext/pcre/tests/pcre_count.phpt b/ext/pcre/tests/pcre_count.phpt deleted file mode 100644 index 1239d48ffb..0000000000 --- a/ext/pcre/tests/pcre_count.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -preg_replace() fifth parameter - count ---FILE-- -<?php -$regex = '/(([0-9a-z]+)-([0-9]+))-(([0-9]+)-([0-9]+))/'; - -$string= '1-2-3-4 a-2-3-4 1-a-3-4 1-2-a-4 1-2-3-a a-a-a-a 4-3-2-1 100-200-300-400-500-600-700-800'; -$count = 0; -var_dump(preg_replace($regex, 'xxxx', $string, -1, $count)); -var_dump($count); -////////////////////////////////////////////////////// - -$regex = '/([a-z]+)/'; - -$string= 'Here must only number like 42 and 13 appear'; -var_dump(preg_replace($regex, 'xxxx', $string, -1, $count)); -var_dump($count); - -//////////////////////////////////////////////////////// -$regex = '~((V(I|1)(4|A)GR(4|A))|(V(I|1)C(0|O)D(I|1)(N|\/\\\/)))~i'; - -$string= 'Viagra V14GR4 Vicodin V1C0D1/\/ v1c0d1/|/'; -var_dump(preg_replace($regex, '...', $string, -1, $count)); -var_dump($count); -//////////////////////////////////////////////////////// -$regex = '~((V(I|1)(4|A)GR(4|A))|(V(I|1)C(0|O)D(I|1)(N|\/\\\/)))~i'; -$count = NULL; -$string= 'Viagra V14GR4 Vicodin V1C0D1/\/ v1c0d1/|/'; -var_dump(preg_replace($regex, '...', $string, -1)); -var_dump($count); -?> ---EXPECT-- -string(56) "xxxx xxxx 1-a-3-4 1-2-a-4 1-2-3-a a-a-a-a xxxx xxxx-xxxx" -int(5) -string(41) "Hxxxx xxxx xxxx xxxx xxxx 42 xxxx 13 xxxx" -int(7) -string(25) "... ... ... ... v1c0d1/|/" -int(4) -string(25) "... ... ... ... v1c0d1/|/" -NULL |
