summaryrefslogtreecommitdiff
path: root/ext/pcre
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-10-14 15:37:22 +0200
committerPeter Kokot <peterkokot@gmail.com>2018-10-14 19:43:12 +0200
commit7af945e271d042a4991c9510f78b6ff7ac43ac34 (patch)
tree31d3b7a69f017cd532c5fe31ce1664d426384f82 /ext/pcre
parentafd534f1634e9a5d631afac39a9c9b09b1ba8b33 (diff)
downloadphp-git-7af945e271d042a4991c9510f78b6ff7ac43ac34.tar.gz
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/pcre')
-rw-r--r--ext/pcre/tests/006.phpt2
-rw-r--r--ext/pcre/tests/bug20528.phpt2
-rw-r--r--ext/pcre/tests/bug21758.phpt8
-rw-r--r--ext/pcre/tests/bug26927.phpt2
-rw-r--r--ext/pcre/tests/bug40909.phpt2
-rw-r--r--ext/pcre/tests/invalid_utf8.phpt8
-rw-r--r--ext/pcre/tests/locales.phpt2
-rw-r--r--ext/pcre/tests/pcre.constants.phpt6
-rw-r--r--ext/pcre/tests/preg_grep_basic.phpt2
-rw-r--r--ext/pcre/tests/preg_match_all_basic.phpt2
-rw-r--r--ext/pcre/tests/preg_match_all_edit_basic.phpt8
-rw-r--r--ext/pcre/tests/preg_match_all_error3.phpt2
-rw-r--r--ext/pcre/tests/preg_match_basic.phpt4
-rw-r--r--ext/pcre/tests/preg_match_basic_002.phpt2
-rw-r--r--ext/pcre/tests/preg_match_basic_edit.phpt6
-rw-r--r--ext/pcre/tests/preg_match_error.phpt2
-rw-r--r--ext/pcre/tests/preg_match_error1.phpt2
-rw-r--r--ext/pcre/tests/preg_match_error2.phpt2
-rw-r--r--ext/pcre/tests/preg_match_variation1.phpt2
-rw-r--r--ext/pcre/tests/preg_quote_basic.phpt2
-rw-r--r--ext/pcre/tests/preg_quote_error.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_basic.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_callback.phpt4
-rw-r--r--ext/pcre/tests/preg_replace_callback3.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_callback_array2.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_callback_basic.phpt4
-rw-r--r--ext/pcre/tests/preg_replace_callback_error.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_callback_error1.phpt2
-rw-r--r--ext/pcre/tests/preg_replace_edit_basic.phpt10
-rw-r--r--ext/pcre/tests/preg_split_basic.phpt2
30 files changed, 50 insertions, 50 deletions
diff --git a/ext/pcre/tests/006.phpt b/ext/pcre/tests/006.phpt
index a16b4fbe71..34ab8c0bca 100644
--- a/ext/pcre/tests/006.phpt
+++ b/ext/pcre/tests/006.phpt
@@ -17,7 +17,7 @@ var_dump($result);
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
string(58) "[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]"
NULL
string(58) "[CODE]&lt;td align=&quot;$stylevar[right]&quot;&gt;[/CODE]"
diff --git a/ext/pcre/tests/bug20528.phpt b/ext/pcre/tests/bug20528.phpt
index 8182fd9bfe..43e548b26e 100644
--- a/ext/pcre/tests/bug20528.phpt
+++ b/ext/pcre/tests/bug20528.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #20528 (preg_split() drops characters (re-opens Bug #15413))
+Bug #20528 (preg_split() drops characters (re-opens Bug #15413))
--FILE--
<?php
$data = '(#11/19/2002#)';
diff --git a/ext/pcre/tests/bug21758.phpt b/ext/pcre/tests/bug21758.phpt
index db599196f2..6e407d4a17 100644
--- a/ext/pcre/tests/bug21758.phpt
+++ b/ext/pcre/tests/bug21758.phpt
@@ -4,20 +4,20 @@ Bug #21758 (preg_replace_callback() not working with class methods)
<?php
class Foo {
function __construct() {
-
+
$s = 'preg_replace() is broken';
-
+
var_dump(preg_replace_callback(
'/broken/',
array(&$this, 'bar'),
$s
));
}
-
+
function bar() {
return 'working';
}
-
+
} // of Foo
$o = new Foo;
diff --git a/ext/pcre/tests/bug26927.phpt b/ext/pcre/tests/bug26927.phpt
index 5c64deb37c..200a534b76 100644
--- a/ext/pcre/tests/bug26927.phpt
+++ b/ext/pcre/tests/bug26927.phpt
@@ -1,5 +1,5 @@
--TEST--
-Bug #26927 (preg_quote() does not escape \0)
+Bug #26927 (preg_quote() does not escape \0)
--FILE--
<?php
$str = "a\000b";
diff --git a/ext/pcre/tests/bug40909.phpt b/ext/pcre/tests/bug40909.phpt
index f66a8f9abb..432069a7ff 100644
--- a/ext/pcre/tests/bug40909.phpt
+++ b/ext/pcre/tests/bug40909.phpt
@@ -2,7 +2,7 @@
Bug #40909 (pcre 7.0 regression)
--FILE--
<?php
-
+
$pattern =
"/\s([\w_\.\/]+)(?:=([\'\"]?(?:[\w\d\s\?=\(\)\.,'_#\/\\:;&-]|(?:\\\\\"|\\\')?)+[\'\"]?))?/";
$context = "<simpletag an_attribute=\"simpleValueInside\">";
diff --git a/ext/pcre/tests/invalid_utf8.phpt b/ext/pcre/tests/invalid_utf8.phpt
index 56bad834dc..f24042a3bd 100644
--- a/ext/pcre/tests/invalid_utf8.phpt
+++ b/ext/pcre/tests/invalid_utf8.phpt
@@ -9,14 +9,14 @@ if (@preg_match('/./u', '') === false) {
--FILE--
<?php
-$string = urldecode("search%e4");
-$result = preg_replace("#(&\#x*)([0-9A-F]+);*#iu","$1$2;",$string);
-var_dump($result);
+$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--
+--EXPECT--
NULL
int(4)
Done
diff --git a/ext/pcre/tests/locales.phpt b/ext/pcre/tests/locales.phpt
index a1030204ee..f2f5b8c073 100644
--- a/ext/pcre/tests/locales.phpt
+++ b/ext/pcre/tests/locales.phpt
@@ -1,7 +1,7 @@
--TEST--
Localized match
--SKIPIF--
-<?php
+<?php
if (!function_exists('setlocale')) die('skip: setlocale() not available');
if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) die('skip pt locale not available');
diff --git a/ext/pcre/tests/pcre.constants.phpt b/ext/pcre/tests/pcre.constants.phpt
index 0b103308e1..ad012e7e69 100644
--- a/ext/pcre/tests/pcre.constants.phpt
+++ b/ext/pcre/tests/pcre.constants.phpt
@@ -1,13 +1,13 @@
--TEST--
-Test for pre-defined pcre constants
+Test for pre-defined pcre constants
--FILE--
<?php
-echo "PCRE constants test\n";
+echo "PCRE constants test\n";
echo "PREG_PATTERN_ORDER= ", PREG_PATTERN_ORDER, "\n";
echo "PREG_OFFSET_CAPTURE= ", PREG_OFFSET_CAPTURE, "\n";
-echo "PREG_SPLIT_NO_EMPTY= ", PREG_SPLIT_NO_EMPTY, "\n";
+echo "PREG_SPLIT_NO_EMPTY= ", PREG_SPLIT_NO_EMPTY, "\n";
echo "PREG_SPLIT_DELIM_CAPTURE= ", PREG_SPLIT_DELIM_CAPTURE, "\n";
echo "PREG_SPLIT_OFFSET_CAPTURE= ", PREG_SPLIT_OFFSET_CAPTURE, "\n";
echo "PREG_GREP_INVERT= ", PREG_GREP_INVERT, "\n";
diff --git a/ext/pcre/tests/preg_grep_basic.phpt b/ext/pcre/tests/preg_grep_basic.phpt
index fe9d7ceaa7..4874aa8ab6 100644
--- a/ext/pcre/tests/preg_grep_basic.phpt
+++ b/ext/pcre/tests/preg_grep_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_grep() function : basic functionality
+Test preg_grep() function : basic functionality
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_match_all_basic.phpt b/ext/pcre/tests/preg_match_all_basic.phpt
index 20c4a96be4..a824c4a6ff 100644
--- a/ext/pcre/tests/preg_match_all_basic.phpt
+++ b/ext/pcre/tests/preg_match_all_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_match_all() function : basic functionality
+Test preg_match_all() function : basic functionality
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_match_all_edit_basic.phpt b/ext/pcre/tests/preg_match_all_edit_basic.phpt
index 9edcf73596..5731814398 100644
--- a/ext/pcre/tests/preg_match_all_edit_basic.phpt
+++ b/ext/pcre/tests/preg_match_all_edit_basic.phpt
@@ -1,11 +1,11 @@
--TEST--
-Test preg_match_all() function : basic functionality
+Test preg_match_all() function : basic functionality
--FILE--
<?php
/* Prototype : proto int preg_match_all(string pattern, string subject, array subpatterns [, int flags [, int offset]])
- * Description: Perform a Perl-style global regular expression match
+ * Description: Perform a Perl-style global regular expression match
* Source code: ext/pcre/php_pcre.c
- * Alias to functions:
+ * Alias to functions:
*/
$string = 'Hello, world! This is a test. This is another test. \[4]. 34534 string.';
@@ -22,7 +22,7 @@ var_dump($match3);
var_dump(preg_match_all('/\d{2}$/', $string, $match4)); //tries to find 2 digits at the end of a string (0 matches)
var_dump($match4);
-var_dump(preg_match_all('/(This is a ){2}(.*)\stest/', $string, $match5)); //tries to find "This is aThis is a [...] test" (0 matches)
+var_dump(preg_match_all('/(This is a ){2}(.*)\stest/', $string, $match5)); //tries to find "This is aThis is a [...] test" (0 matches)
var_dump($match5);
?>
--EXPECTF--
diff --git a/ext/pcre/tests/preg_match_all_error3.phpt b/ext/pcre/tests/preg_match_all_error3.phpt
index 547ff03e44..6c1422b61a 100644
--- a/ext/pcre/tests/preg_match_all_error3.phpt
+++ b/ext/pcre/tests/preg_match_all_error3.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_match_all() function : error conditions
+Test preg_match_all() function : error conditions
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_match_basic.phpt b/ext/pcre/tests/preg_match_basic.phpt
index ddf54a0aaf..1f20bbdde5 100644
--- a/ext/pcre/tests/preg_match_basic.phpt
+++ b/ext/pcre/tests/preg_match_basic.phpt
@@ -1,8 +1,8 @@
--TEST--
-Test preg_match() function : basic functionality
+Test preg_match() function : basic functionality
--FILE--
<?php
-/*
+/*
* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
* Function is implemented in ext/pcre/php_pcre.c
*/
diff --git a/ext/pcre/tests/preg_match_basic_002.phpt b/ext/pcre/tests/preg_match_basic_002.phpt
index 977a67ea10..e4854f6b08 100644
--- a/ext/pcre/tests/preg_match_basic_002.phpt
+++ b/ext/pcre/tests/preg_match_basic_002.phpt
@@ -6,7 +6,7 @@ preg_match() single line match with multi-line input
* Description: Perform a regular expression match
* Source code: ext/pcre/php_pcre.c
*/
-
+
$string = "My\nName\nIs\nStrange";
preg_match("/M(.*)/", $string, $matches);
diff --git a/ext/pcre/tests/preg_match_basic_edit.phpt b/ext/pcre/tests/preg_match_basic_edit.phpt
index bd469d3346..116899c60f 100644
--- a/ext/pcre/tests/preg_match_basic_edit.phpt
+++ b/ext/pcre/tests/preg_match_basic_edit.phpt
@@ -1,11 +1,11 @@
--TEST--
-Test preg_match() function : basic functionality
+Test preg_match() function : basic functionality
--FILE--
<?php
/* Prototype : proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
- * Description: Perform a Perl-style regular expression match
+ * Description: Perform a Perl-style regular expression match
* Source code: ext/pcre/php_pcre.c
- * Alias to functions:
+ * Alias to functions:
*/
diff --git a/ext/pcre/tests/preg_match_error.phpt b/ext/pcre/tests/preg_match_error.phpt
index ca1f128ada..7d318115f6 100644
--- a/ext/pcre/tests/preg_match_error.phpt
+++ b/ext/pcre/tests/preg_match_error.phpt
@@ -2,7 +2,7 @@
Test preg_match() function : error conditions - wrong numbers of parameters
--FILE--
<?php
-/*
+/*
* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
* Function is implemented in ext/pcre/php_pcre.c
*/
diff --git a/ext/pcre/tests/preg_match_error1.phpt b/ext/pcre/tests/preg_match_error1.phpt
index ec9cf8cec8..ba0aea4912 100644
--- a/ext/pcre/tests/preg_match_error1.phpt
+++ b/ext/pcre/tests/preg_match_error1.phpt
@@ -2,7 +2,7 @@
Test preg_match() function : error conditions - bad regular expressions
--FILE--
<?php
-/*
+/*
* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
* Function is implemented in ext/pcre/php_pcre.c
*/
diff --git a/ext/pcre/tests/preg_match_error2.phpt b/ext/pcre/tests/preg_match_error2.phpt
index f30fb48037..f44b1d0f72 100644
--- a/ext/pcre/tests/preg_match_error2.phpt
+++ b/ext/pcre/tests/preg_match_error2.phpt
@@ -2,7 +2,7 @@
Test preg_match() function : error conditions - wrong arg types
--FILE--
<?php
-/*
+/*
* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
* Function is implemented in ext/pcre/php_pcre.c
*/
diff --git a/ext/pcre/tests/preg_match_variation1.phpt b/ext/pcre/tests/preg_match_variation1.phpt
index a289ee48ee..5fa50ce49c 100644
--- a/ext/pcre/tests/preg_match_variation1.phpt
+++ b/ext/pcre/tests/preg_match_variation1.phpt
@@ -2,7 +2,7 @@
Test preg_match() function : variation
--FILE--
<?php
-/*
+/*
* proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
* Function is implemented in ext/pcre/php_pcre.c
*/
diff --git a/ext/pcre/tests/preg_quote_basic.phpt b/ext/pcre/tests/preg_quote_basic.phpt
index c78f5665c0..2697a80155 100644
--- a/ext/pcre/tests/preg_quote_basic.phpt
+++ b/ext/pcre/tests/preg_quote_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_quote() function : basic functionality
+Test preg_quote() function : basic functionality
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_quote_error.phpt b/ext/pcre/tests/preg_quote_error.phpt
index 30b832dbf9..b5dd733b2f 100644
--- a/ext/pcre/tests/preg_quote_error.phpt
+++ b/ext/pcre/tests/preg_quote_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_quote() function : error conditions - wrong numbers of parameters
+Test preg_quote() function : error conditions - wrong numbers of parameters
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_replace_basic.phpt b/ext/pcre/tests/preg_replace_basic.phpt
index 6962bce255..9c2eba47d8 100644
--- a/ext/pcre/tests/preg_replace_basic.phpt
+++ b/ext/pcre/tests/preg_replace_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_replace() function : basic functionality
+Test preg_replace() function : basic functionality
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_replace_callback.phpt b/ext/pcre/tests/preg_replace_callback.phpt
index 0b0bc27576..a52ef5c962 100644
--- a/ext/pcre/tests/preg_replace_callback.phpt
+++ b/ext/pcre/tests/preg_replace_callback.phpt
@@ -2,11 +2,11 @@
preg_replace_callback()
--FILE--
<?php
-$input = "plain [indent] deep [indent] [abcd]deeper[/abcd] [/indent] deep [/indent] plain";
+$input = "plain [indent] deep [indent] [abcd]deeper[/abcd] [/indent] deep [/indent] plain";
function parseTagsRecursive($input)
{
-
+
$regex = '#\[indent]((?:[^[]|\[(?!/?indent])|(?R))+)\[/indent]#';
if (is_array($input)) {
diff --git a/ext/pcre/tests/preg_replace_callback3.phpt b/ext/pcre/tests/preg_replace_callback3.phpt
index fc3218b9e7..82047952e6 100644
--- a/ext/pcre/tests/preg_replace_callback3.phpt
+++ b/ext/pcre/tests/preg_replace_callback3.phpt
@@ -17,7 +17,7 @@ var_dump(preg_replace_callback($a,$a,$a,$a,$a));
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
NULL
diff --git a/ext/pcre/tests/preg_replace_callback_array2.phpt b/ext/pcre/tests/preg_replace_callback_array2.phpt
index 8e70bb06e8..2455223987 100644
--- a/ext/pcre/tests/preg_replace_callback_array2.phpt
+++ b/ext/pcre/tests/preg_replace_callback_array2.phpt
@@ -33,7 +33,7 @@ try {
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Warning: preg_replace_callback_array() expects at least 2 parameters, 0 given in %s on line %d
NULL
diff --git a/ext/pcre/tests/preg_replace_callback_basic.phpt b/ext/pcre/tests/preg_replace_callback_basic.phpt
index 01d290a1b9..6f359f27eb 100644
--- a/ext/pcre/tests/preg_replace_callback_basic.phpt
+++ b/ext/pcre/tests/preg_replace_callback_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_replace_callback() function : basic functionality
+Test preg_replace_callback() function : basic functionality
--FILE--
<?php
/*
@@ -13,7 +13,7 @@ $replacement = array('zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seve
function integer_word($matches) {
global $replacement;
return $replacement[$matches[0]]; //all examples will be looking for an integer value, if one is found it will be stored in $matches[0] which corresponds to a key in the $replacements array
-
+
}
$subject1 = 'there are 7 words in this sentence.';
$new_subject1 = preg_replace_callback('/\d/', "integer_word", $subject1);
diff --git a/ext/pcre/tests/preg_replace_callback_error.phpt b/ext/pcre/tests/preg_replace_callback_error.phpt
index 9371fcf1bf..2834eea4db 100644
--- a/ext/pcre/tests/preg_replace_callback_error.phpt
+++ b/ext/pcre/tests/preg_replace_callback_error.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_replace_callback() function : error
+Test preg_replace_callback() function : error
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_replace_callback_error1.phpt b/ext/pcre/tests/preg_replace_callback_error1.phpt
index a00b97c1bb..add24fbc82 100644
--- a/ext/pcre/tests/preg_replace_callback_error1.phpt
+++ b/ext/pcre/tests/preg_replace_callback_error1.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_replace_callback() function : error
+Test preg_replace_callback() function : error
--FILE--
<?php
/*
diff --git a/ext/pcre/tests/preg_replace_edit_basic.phpt b/ext/pcre/tests/preg_replace_edit_basic.phpt
index 556b48b8c1..cd9297684d 100644
--- a/ext/pcre/tests/preg_replace_edit_basic.phpt
+++ b/ext/pcre/tests/preg_replace_edit_basic.phpt
@@ -1,11 +1,11 @@
--TEST--
-Test preg_replace() function : basic
+Test preg_replace() function : basic
--FILE--
<?php
/* Prototype : proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
- * Description: Perform Perl-style regular expression replacement.
+ * Description: Perform Perl-style regular expression replacement.
* Source code: ext/pcre/php_pcre.c
- * Alias to functions:
+ * Alias to functions:
*/
$string = '123456789 - Hello, world - This is a string.';
@@ -14,7 +14,7 @@ var_dump($string);
var_dump(preg_replace('<- This is a string$>',
'This shouldn\'t work', $string)); //tries to find '- This is a string' at the end of a string but can't so replaces nothing and prints the unchanged $string.
-var_dump(preg_replace('<[0-35-9]>',
+var_dump(preg_replace('<[0-35-9]>',
'4', $string, //finds any number that's not 4 and replaces it with a 4
'5', $count)); //limits to 5 replacements returns 444444789
var_dump($count); //counts the number of replacements made (5)
@@ -26,7 +26,7 @@ var_dump(preg_replace('<\b[hH]\w{2,4}>',
var_dump(preg_replace('<(\w)\s*-\s*(\w)>',
'\\1. \\2', $string)); //finds dashes with an indefinite amount of whitespace around them and replaces them with a full stop precedeby no spaces and followed by one space
-var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>',
+var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>',
'\\1 at \\2 dot \\3 dot \\4', 'josmessa@uk.ibm.com')); //finds the e-mail address and replaces the @ and . with "at" and "dot" (uses backreferences) ('josmessa at uk dot ibm dot com')
?>
--EXPECTF--
diff --git a/ext/pcre/tests/preg_split_basic.phpt b/ext/pcre/tests/preg_split_basic.phpt
index 5d23ce6df1..c33640920b 100644
--- a/ext/pcre/tests/preg_split_basic.phpt
+++ b/ext/pcre/tests/preg_split_basic.phpt
@@ -1,5 +1,5 @@
--TEST--
-Test preg_split() function : basic functionality
+Test preg_split() function : basic functionality
--FILE--
<?php
/*