Skip to content

Commit 78bfee1

Browse files
committed
adding test
1 parent 0ede7ce commit 78bfee1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ext/gettext/tests/gh17400.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
Bug #53251 (bindtextdomain with null dir doesn't return old value)
3+
--EXTENSIONS--
4+
gettext
5+
--CREDITS--
6+
YuanchengJiang
7+
--FILE--
8+
<?php
9+
$utf16_first_le = pack("H*", "00d800dc");
10+
$utf16le_char_bad = pack("H*", "00dc00dc");
11+
12+
try {
13+
bindtextdomain($utf16le_char_bad,$utf16_first_le);
14+
} catch (\ValueError $e) {
15+
echo $e->getMessage();
16+
}
17+
?>
18+
--EXPECT--
19+
bindtextdomain(): Argument #1 ($domain) cannot be empty

0 commit comments

Comments
 (0)