Annotation of embedaddon/php/ext/posix/tests/posix_getpwuid_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test posix_getpwuid() 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 array posix_getpwuid(long uid)
        !            10:  * Description: User database access (POSIX.1, 9.2.2) 
        !            11:  * Source code: ext/posix/posix.c
        !            12:  * Alias to functions: 
        !            13:  */
        !            14: 
        !            15: echo "*** Testing posix_getpwuid() : error conditions ***\n";
        !            16: 
        !            17: echo "\n-- Testing posix_getpwuid() function with Zero arguments --\n";
        !            18: var_dump( posix_getpwuid() );
        !            19: 
        !            20: echo "\n-- Testing posix_getpwuid() function with more than expected no. of arguments --\n";
        !            21: $uid = posix_getuid();
        !            22: $extra_arg = 10;
        !            23: var_dump( posix_getpwuid($uid, $extra_arg) );
        !            24: 
        !            25: echo "\n-- Testing posix_getpwuid() function negative uid --\n";
        !            26: $uid = -99;
        !            27: var_dump( posix_getpwuid($uid) );
        !            28: 
        !            29: echo "Done";
        !            30: ?>
        !            31: --EXPECTF--
        !            32: *** Testing posix_getpwuid() : error conditions ***
        !            33: 
        !            34: -- Testing posix_getpwuid() function with Zero arguments --
        !            35: 
        !            36: Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d
        !            37: bool(false)
        !            38: 
        !            39: -- Testing posix_getpwuid() function with more than expected no. of arguments --
        !            40: 
        !            41: Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d
        !            42: bool(false)
        !            43: 
        !            44: -- Testing posix_getpwuid() function negative uid --
        !            45: bool(false)
        !            46: Done

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