Annotation of embedaddon/php/ext/standard/tests/strings/nl_langinfo_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test nl_langinfo() function : error conditions
3: --SKIPIF--
4: <?php
5: if( substr(PHP_OS, 0, 3) == 'WIN'){
6: die('skip Not for Windows');
7: }
8: ?>
9: --FILE--
10: <?php
11:
12: /* Prototype : string nl_langinfo ( int $item )
13: * Description: Query language and locale information
14: * Source code: ext/standard/string.c
15: */
16:
17: echo "*** Testing nl_langinfo() : error conditions ***\n";
18:
19: echo "\n-- Testing nl_langinfo() function with no arguments --\n";
20: var_dump( nl_langinfo() );
21:
22: echo "\n-- Testing nl_langinfo() function with more than expected no. of arguments --\n";
23: $extra_arg = 10;
24: var_dump( nl_langinfo(ABDAY_2, $extra_arg) );
25:
26: ?>
27: ===DONE===
28: --EXPECTF--
29: *** Testing nl_langinfo() : error conditions ***
30:
31: -- Testing nl_langinfo() function with no arguments --
32:
33: Warning: nl_langinfo() expects exactly 1 parameter, 0 given in %s on line %d
34: NULL
35:
36: -- Testing nl_langinfo() function with more than expected no. of arguments --
37:
38: Warning: nl_langinfo() expects exactly 1 parameter, 2 given in %s on line %d
39: NULL
40: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>