Skip to content

Commit a4fbc99

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: ext/gettext/tests: updates for musl-1.2.6
2 parents d3f4ead + c3e8f8b commit a4fbc99

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

ext/gettext/tests/bug53251.phpt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,21 @@ $expected = [true, true, false, "UTF-8", "UTF-8"];
2121
// "foo" is unbound, so in the first call, you will get false instead
2222
// of a string.
2323
//
24-
// bind_textdomain_codeset() always returns false on musl
25-
// because musl only supports UTF-8. For more information:
24+
// Prior to v1.2.6, bind_textdomain_codeset() always returns false on
25+
// musl because musl only supports UTF-8. For more information:
2626
//
2727
// * https://github.com/php/doc-en/issues/4311,
2828
// * https://github.com/php/php-src/issues/17163
2929
//
3030
$expected_musl = [false, true, false, false, false];
3131

32-
var_dump($results === $expected || $results === $expected_musl);
32+
// As of v1.2.6, bind_textdomain_codeset() returns "UTF-8" in all
33+
// three cases on musl because UTF-8 is the only supported codeset.
34+
$expected_musl126 = [false, true, "UTF-8", "UTF-8", "UTF-8"];
35+
36+
var_dump($results === $expected
37+
|| $results === $expected_musl
38+
|| $results === $expected_musl126);
3339
?>
3440
--EXPECT--
3541
bool(true)

ext/gettext/tests/gettext_bind_textdomain_codeset-retval.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ gettext
1717
}
1818

1919
// bind_textdomain_codeset() always returns false on musl
20-
// because musl only supports UTF-8. For more information:
20+
// prior to v1.2.6. For more information:
2121
//
2222
// * https://github.com/php/doc-en/issues/4311,
2323
// * https://github.com/php/php-src/issues/17163
2424
//
25+
// As of v1.2.6, it returns "UTF-8" as well.
2526
$result = bind_textdomain_codeset('messages', "UTF-8");
2627
var_dump($result === false || $result === "UTF-8");
2728

0 commit comments

Comments
 (0)