php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #70542
Patch bug70542 revision 2015-10-24 05:26 UTC by kalle@php.net
Patch gettext-tests-valid-categories revision 2015-09-24 13:52 UTC by rainer dot jung at kippdata dot de

Patch gettext-tests-valid-categories for Gettext related Bug #70542

Patch version 2015-09-24 13:52 UTC

Return to Bug #70542 | Download this patch
Patch Revisions:

Developer: rainer.jung@kippdata.de

diff --git a/ext/gettext/tests/44938.phpt b/ext/gettext/tests/44938.phpt
index f2d594a..7ac753b 100644
--- a/ext/gettext/tests/44938.phpt
+++ b/ext/gettext/tests/44938.phpt
@@ -23,12 +23,12 @@ var_dump(gettext($overflown));
 var_dump(ngettext($overflown, $msgid, -1));
 var_dump(ngettext($msgid, $overflown, -1));

-var_dump(dcgettext($overflown, $msgid, -1));
-var_dump(dcgettext($domain, $overflown, -1));
+var_dump(dcgettext($overflown, $msgid, LC_ALL));
+var_dump(dcgettext($domain, $overflown, LC_ALL));

-var_dump(dcngettext($overflown, $msgid, $msgid, -1, -1));
-var_dump(dcngettext($domain, $overflown, $msgid, -1, -1));
-var_dump(dcngettext($domain, $msgid, $overflown, -1, -1));
+var_dump(dcngettext($overflown, $msgid, $msgid, -1, LC_ALL));
+var_dump(dcngettext($domain, $overflown, $msgid, -1, LC_ALL));
+var_dump(dcngettext($domain, $msgid, $overflown, -1, LC_ALL));

 var_dump(dgettext($overflown, $msgid));
 var_dump(dgettext($domain, $overflown));
diff --git a/ext/gettext/tests/dcngettext.phpt b/ext/gettext/tests/dcngettext.phpt
index 2b8e2b1..f408fc6 100644
--- a/ext/gettext/tests/dcngettext.phpt
+++ b/ext/gettext/tests/dcngettext.phpt
@@ -9,12 +9,12 @@ if (!function_exists("dcngettext")) die("skip dcngettext() doesn't exist");
 <?php

 var_dump(dcngettext(1,1,1,1));
-var_dump(dcngettext(1,1,1,1,1));
-var_dump(dcngettext("test","test","test",1,1));
-var_dump(dcngettext("test","test","test",0,0));
-var_dump(dcngettext("test","test","test",-1,-1));
-var_dump(dcngettext("","","",1,1));
-var_dump(dcngettext("","","",0,0));
+var_dump(dcngettext(1,1,1,1,LC_NUMERIC));
+var_dump(dcngettext("test","test","test",1,LC_NUMERIC));
+var_dump(dcngettext("test","test","test",0,LC_CTYPE));
+var_dump(dcngettext("test","test","test",-1,LC_ALL));
+var_dump(dcngettext("","","",1,LC_NUMERIC));
+var_dump(dcngettext("","","",0,LC_CTYPE));

 echo "Done\n";
 ?>
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 22 18:01:26 2019 UTC