From: Antony Dovgal Date: Tue, 29 Aug 2006 22:12:31 +0000 (+0000) Subject: fix PCRE tests X-Git-Tag: RELEASE_1_0_0RC1~1856 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=996d8d122654455fc2fd4dfdb9473a5086365f3b;p=php fix PCRE tests --- diff --git a/ext/pcre/tests/bug34790.phpt b/ext/pcre/tests/bug34790.phpt index c375ae5ac8..c347702696 100755 --- a/ext/pcre/tests/bug34790.phpt +++ b/ext/pcre/tests/bug34790.phpt @@ -21,3 +21,14 @@ array(4) { [3]=> string(3) "the" } +--UEXPECT-- +array(4) { + [0]=> + unicode(3) "the" + [1]=> + unicode(3) "the" + [2]=> + unicode(3) "the" + [3]=> + unicode(3) "the" +} diff --git a/ext/pcre/tests/dollar_endonly.phpt b/ext/pcre/tests/dollar_endonly.phpt index 96a52441df..a8cfa5710e 100644 --- a/ext/pcre/tests/dollar_endonly.phpt +++ b/ext/pcre/tests/dollar_endonly.phpt @@ -37,3 +37,27 @@ array(1) { " } } +--UEXPECT-- +int(1) +array(1) { + [0]=> + array(1) { + [0]=> + unicode(5) "aeiou" + } +} +int(0) +array(1) { + [0]=> + array(0) { + } +} +int(1) +array(1) { + [0]=> + array(1) { + [0]=> + unicode(6) "aeiou +" + } +} diff --git a/ext/pcre/tests/match_flags.phpt b/ext/pcre/tests/match_flags.phpt index ddd36bf9ba..27de99853c 100644 --- a/ext/pcre/tests/match_flags.phpt +++ b/ext/pcre/tests/match_flags.phpt @@ -125,3 +125,112 @@ array(2) { } } } +--UEXPECT-- +int(2) +array(2) { + [0]=> + array(2) { + [0]=> + unicode(2) "zx" + [1]=> + unicode(2) "ax" + } + [1]=> + array(2) { + [0]=> + unicode(1) "z" + [1]=> + unicode(1) "a" + } +} +int(2) +array(2) { + [0]=> + array(2) { + [0]=> + unicode(2) "zx" + [1]=> + unicode(1) "z" + } + [1]=> + array(2) { + [0]=> + unicode(2) "yx" + [1]=> + unicode(1) "y" + } +} +int(2) +array(2) { + [0]=> + array(2) { + [0]=> + array(2) { + [0]=> + unicode(2) "zx" + [1]=> + int(0) + } + [1]=> + array(2) { + [0]=> + unicode(2) "yx" + [1]=> + int(2) + } + } + [1]=> + array(2) { + [0]=> + array(2) { + [0]=> + unicode(1) "z" + [1]=> + int(0) + } + [1]=> + array(2) { + [0]=> + unicode(1) "y" + [1]=> + int(2) + } + } +} +int(2) +array(2) { + [0]=> + array(2) { + [0]=> + array(2) { + [0]=> + unicode(2) "zx" + [1]=> + int(0) + } + [1]=> + array(2) { + [0]=> + unicode(1) "z" + [1]=> + int(0) + } + } + [1]=> + array(2) { + [0]=> + array(2) { + [0]=> + unicode(2) "yx" + [1]=> + int(2) + } + [1]=> + array(2) { + [0]=> + unicode(1) "y" + [1]=> + int(2) + } + } +} diff --git a/ext/pcre/tests/match_flags2.phpt b/ext/pcre/tests/match_flags2.phpt index eea8d6cf28..e84373adfd 100644 --- a/ext/pcre/tests/match_flags2.phpt +++ b/ext/pcre/tests/match_flags2.phpt @@ -99,14 +99,14 @@ array(2) { [0]=> array(2) { [0]=> - string(2) "xa" + unicode(2) "xa" [1]=> int(4) } [1]=> array(2) { [0]=> - string(1) "a" + unicode(1) "a" [1]=> int(5) } @@ -116,14 +116,14 @@ array(2) { [0]=> array(2) { [0]=> - string(2) "ax" + unicode(2) "ax" [1]=> int(5) } [1]=> array(2) { [0]=> - string(1) "a" + unicode(1) "a" [1]=> int(5) } @@ -133,42 +133,42 @@ array(6) { [0]=> array(2) { [0]=> - string(4) "zxax" + unicode(4) "zxax" [1]=> int(3) } [u"capt1"]=> array(2) { [0]=> - string(1) "z" + unicode(1) "z" [1]=> int(3) } [1]=> array(2) { [0]=> - string(1) "z" + unicode(1) "z" [1]=> int(3) } [2]=> array(2) { [0]=> - string(1) "x" + unicode(1) "x" [1]=> int(4) } [u"letsmix"]=> array(2) { [0]=> - string(2) "ax" + unicode(2) "ax" [1]=> int(5) } [3]=> array(2) { [0]=> - string(2) "ax" + unicode(2) "ax" [1]=> int(5) } diff --git a/ext/pcre/tests/match_flags3.phpt b/ext/pcre/tests/match_flags3.phpt index f22205e3d8..5a1eaef299 100644 --- a/ext/pcre/tests/match_flags3.phpt +++ b/ext/pcre/tests/match_flags3.phpt @@ -44,3 +44,29 @@ array(1) { Warning: preg_match(): Numeric named subpatterns are not allowed in %smatch_flags3.php on line 14 bool(false) +--UEXPECTF-- +Warning: preg_match(): Empty regular expression in %s on line %d +bool(false) +int(1) +array(1) { + [0]=> + unicode(3) "789" +} +int(1) +array(1) { + [0]=> + unicode(3) "123" +} +int(2) +array(1) { + [0]=> + array(2) { + [0]=> + unicode(3) "789" + [1]=> + unicode(3) "012" + } +} + +Warning: preg_match(): Numeric named subpatterns are not allowed in %s on line %d +bool(false) diff --git a/ext/pcre/tests/pcre_anchored.phpt b/ext/pcre/tests/pcre_anchored.phpt index caa96437e1..e368155633 100644 --- a/ext/pcre/tests/pcre_anchored.phpt +++ b/ext/pcre/tests/pcre_anchored.phpt @@ -20,3 +20,12 @@ array(1) { int(0) int(0) int(0) +--UEXPECT-- +int(1) +array(1) { + [0]=> + unicode(3) "abc" +} +int(0) +int(0) +int(0) diff --git a/ext/pcre/tests/pcre_extended.phpt b/ext/pcre/tests/pcre_extended.phpt index 6c4b20e7f0..74fb7f1686 100644 --- a/ext/pcre/tests/pcre_extended.phpt +++ b/ext/pcre/tests/pcre_extended.phpt @@ -27,3 +27,17 @@ array(1) { [0]=> string(5) "aeiou" } +--UEXPECT-- +int(0) +array(0) { +} +int(1) +array(1) { + [0]=> + unicode(5) "aeiou" +} +int(1) +array(1) { + [0]=> + unicode(5) "aeiou" +} diff --git a/ext/pcre/tests/study.phpt b/ext/pcre/tests/study.phpt index 696a4c0ef0..e3a69922e7 100644 --- a/ext/pcre/tests/study.phpt +++ b/ext/pcre/tests/study.phpt @@ -29,3 +29,14 @@ int(1) string(5) "aeiou" int(1) string(5) "aeiou" +--UEXPECT-- +int(1) +unicode(1) "a" +int(1) +unicode(1) "a" +int(1) +unicode(1) "i" +int(1) +unicode(5) "aeiou" +int(1) +unicode(5) "aeiou" diff --git a/ext/pcre/tests/ungreedy.phpt b/ext/pcre/tests/ungreedy.phpt index cf5e8adafd..9282aac6de 100644 --- a/ext/pcre/tests/ungreedy.phpt +++ b/ext/pcre/tests/ungreedy.phpt @@ -29,3 +29,19 @@ array(1) { [0]=> string(4) "" } +--UEXPECT-- +int(1) +array(1) { + [0]=> + unicode(14) " " +} +int(1) +array(1) { + [0]=> + unicode(4) "" +} +int(1) +array(1) { + [0]=> + unicode(4) "" +}