xref: /PHP-7.4/ext/gettext/tests/dcngettext.phpt (revision 782352c5)
1--TEST--
2dcngettext() tests
3--SKIPIF--
4<?php
5if (!extension_loaded("gettext")) die("skip");
6if (!function_exists("dcngettext")) die("skip dcngettext() doesn't exist");
7?>
8--FILE--
9<?php
10
11var_dump(dcngettext(1,1,1,1));
12var_dump(dcngettext(1,1,1,1,1));
13var_dump(dcngettext("test","test","test",1,1));
14var_dump(dcngettext("test","test","test",0,0));
15var_dump(dcngettext("test","test","test",-1,-1));
16var_dump(dcngettext("","","",1,1));
17var_dump(dcngettext("","","",0,0));
18
19echo "Done\n";
20?>
21--EXPECTF--
22Warning: dcngettext() expects exactly 5 parameters, 4 given in %s on line %d
23bool(false)
24string(1) "1"
25string(4) "test"
26string(4) "test"
27string(4) "test"
28string(0) ""
29string(0) ""
30Done
31