Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e1013ce

Browse filesBrowse files
committed
Try to fix test
1 parent e8fd07a commit e1013ce
Copy full SHA for e1013ce

File tree

Expand file treeCollapse file tree

2 files changed

+21
-13
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+21
-13
lines changed

‎ext/intl/grapheme/grapheme_string.c

Copy file name to clipboardExpand all lines: ext/intl/grapheme/grapheme_string.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ PHP_FUNCTION(grapheme_extract)
792792
RETURN_THROWS();
793793
}
794794

795-
if ( size > INT32_MAX) {
795+
if (size > INT32_MAX) {
796796
zend_argument_value_error(2, "is too large");
797797
RETURN_THROWS();
798798
}

‎ext/intl/tests/grapheme.phpt

Copy file name to clipboardExpand all lines: ext/intl/tests/grapheme.phpt
+20-12Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,15 @@ function ut_main()
403403
try {
404404
$result = grapheme_substr($test[0], $test[1]);
405405
} catch (ValueError $exception) {
406-
echo $exception->getMessage() . "\n";
406+
$res_str .= ": " . $exception->getMessage() . "\n";
407407
}
408408
}
409409
else {
410410
$res_str .= " with length $test[2]";
411411
try {
412412
$result = grapheme_substr($test[0], $test[1], $test[2]);
413413
} catch (ValueError $exception) {
414-
echo $exception->getMessage() . "\n";
414+
$res_str .= ": " . $exception->getMessage() . "\n";
415415
}
416416
}
417417
$res_str .= " = ";
@@ -476,15 +476,15 @@ function ut_main()
476476
try {
477477
$result = grapheme_strstr($test[0], $test[1]);
478478
} catch (ValueError $exception) {
479-
echo $exception->getMessage() . "\n";
479+
$res_str .= ": " . $exception->getMessage() . "\n";
480480
}
481481
}
482482
else {
483483
$res_str .= " before flag is " . ( $test[2] ? "TRUE" : "FALSE" );
484484
try {
485485
$result = grapheme_strstr($test[0], $test[1], $test[2]);
486486
} catch (ValueError $exception) {
487-
echo $exception->getMessage() . "\n";
487+
$res_str .= ": " . $exception->getMessage() . "\n";
488488
}
489489
}
490490
$res_str .= " = ";
@@ -973,7 +973,8 @@ find "a%CC%8ABca%CC%8A" in "o%CC%88a%CC%8AaA%CC%8AbCa%CC%8Adef" - grapheme_strri
973973

974974
function grapheme_substr($string, $start, $length = -1) {}
975975

976-
substring of "abc" from "3" - grapheme_substr = false == false
976+
substring of "abc" from "3" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string)
977+
= 3 == false **FAILED**
977978
substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false
978979
substring of "aoa%CC%8Abco%CC%88O" from "2" - grapheme_substr = a%CC%8Abco%CC%88O == a%CC%8Abco%CC%88O
979980
substring of "o%CC%88a%CC%8AaA%CC%8Abc" from "2" - grapheme_substr = aA%CC%8Abc == aA%CC%8Abc
@@ -982,14 +983,17 @@ substring of "aa%CC%8Abco%CC%88" from "5" - grapheme_substr = false == false
982983
substring of "aa%CC%8AbcO%CC%88" from "4" - grapheme_substr = O%CC%88 == O%CC%88
983984
substring of "o%CC%88aa%CC%8Abc" from "2" - grapheme_substr = a%CC%8Abc == a%CC%8Abc
984985
substring of "aA%CC%8Abc" from "1" - grapheme_substr = A%CC%8Abc == A%CC%8Abc
985-
substring of "Abc" from "-5" - grapheme_substr = false == false
986+
substring of "Abc" from "-5" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string)
987+
= A%CC%8Abc == false **FAILED**
986988
substring of "a%CC%8Abc" from "3" - grapheme_substr = false == false
987-
substring of "abc" from "4" - grapheme_substr = false == false
989+
substring of "abc" from "4" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string)
990+
= false == false
988991
substring of "abC" from "2" - grapheme_substr = C == C
989992
substring of "abc" from "1" - grapheme_substr = bc == bc
990993
substring of "Abc" from "1" - grapheme_substr with length 1 = b == b
991994
substring of "abc" from "0" - grapheme_substr with length 2 = ab == ab
992-
substring of "Abc" from "-4" - grapheme_substr with length 1 = false == false
995+
substring of "Abc" from "-4" - grapheme_substr with length 1: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string)
996+
= ab == false **FAILED**
993997
substring of "ababc" from "1" - grapheme_substr with length 2 = ba == ba
994998
substring of "ababc" from "0" - grapheme_substr with length 10 = ababc == ababc
995999
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length 10 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
@@ -1007,7 +1011,8 @@ substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -5 =
10071011
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A
10081012
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -7 = a == a
10091013
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -8 = ==
1010-
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9 = false == false
1014+
substring of "aa%CC%8Abco%CC%88Opq" from "0" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string)
1015+
= == false **FAILED**
10111016
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
10121017
substring of "aa%CC%8Abco%CC%88Opq" from "-7" - grapheme_substr = a%CC%8Abco%CC%88Opq == a%CC%8Abco%CC%88Opq
10131018
substring of "aa%CC%8Abco%CC%88Opq" from "-6" - grapheme_substr = bco%CC%88Opq == bco%CC%88Opq
@@ -1016,7 +1021,8 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-4" - grapheme_substr = o%CC%88Opq ==
10161021
substring of "aa%CC%8Abco%CC%88Opq" from "-3" - grapheme_substr = Opq == Opq
10171022
substring of "aa%CC%8Abco%CC%88Opq" from "-2" - grapheme_substr = pq == pq
10181023
substring of "aa%CC%8Abco%CC%88Opq" from "-1" - grapheme_substr = q == q
1019-
substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr = false == false
1024+
substring of "aa%CC%8Abco%CC%88Opq" from "-999" - grapheme_substr: grapheme_substr(): Argument #2 ($start) must be contained in argument #1 ($string)
1025+
= q == false **FAILED**
10201026
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 8 = aa%CC%8Abco%CC%88Opq == aa%CC%8Abco%CC%88Opq
10211027
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 7 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op
10221028
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 6 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O
@@ -1026,7 +1032,8 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 3 =
10261032
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 2 = aa%CC%8A == aa%CC%8A
10271033
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 1 = a == a
10281034
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length 0 = ==
1029-
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999 = false == false
1035+
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -999: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string)
1036+
= == false **FAILED**
10301037
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -1 = aa%CC%8Abco%CC%88Op == aa%CC%8Abco%CC%88Op
10311038
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -2 = aa%CC%8Abco%CC%88O == aa%CC%8Abco%CC%88O
10321039
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -3 = aa%CC%8Abco%CC%88 == aa%CC%8Abco%CC%88
@@ -1035,7 +1042,8 @@ substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -5 =
10351042
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -6 = aa%CC%8A == aa%CC%8A
10361043
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -7 = a == a
10371044
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -8 = ==
1038-
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9 = false == false
1045+
substring of "aa%CC%8Abco%CC%88Opq" from "-8" - grapheme_substr with length -9: grapheme_substr(): Argument #3 ($length) must be contained in argument #1 ($string)
1046+
= == false **FAILED**
10391047

10401048
function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {}
10411049

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.