Annotation of embedaddon/php/ext/posix/tests/posix_getpid_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test posix_getpid() function : error conditions 
                      3: --SKIPIF--
                      4: <?php 
                      5:        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: /* Prototype  : proto int posix_getpid(void)
                     10:  * Description: Get the current process id (POSIX.1, 4.1.1) 
                     11:  * Source code: ext/posix/posix.c
                     12:  * Alias to functions: 
                     13:  */
                     14: 
                     15: echo "*** Testing posix_getpid() : error conditions ***\n";
                     16: 
                     17: // One argument
                     18: echo "\n-- Testing posix_getpid() function with one argument --\n";
                     19: $extra_arg = 10;
                     20: var_dump( posix_getpid($extra_arg) );
                     21: 
                     22: echo "Done";
                     23: ?>
                     24: --EXPECTF--
                     25: *** Testing posix_getpid() : error conditions ***
                     26: 
                     27: -- Testing posix_getpid() function with one argument --
                     28: 
                     29: Warning: posix_getpid() expects exactly 0 parameters, 1 given in %s on line %d
                     30: NULL
                     31: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>