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

1.1     ! misho       1: --TEST--
        !             2: Test function posix_errno() by calling it with with permission error
        !             3: --CREDITS--
        !             4: Morten Amundsen mor10am@gmail.com
        !             5: Francesco Fullone ff@ideato.it
        !             6: #PHPTestFest Cesena Italia on 2009-06-20
        !             7: --SKIPIF--
        !             8: <?php 
        !             9:         if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 
        !            10:         if(posix_getuid()==0) print "skip - Cannot run test as root.";    
        !            11: ?>
        !            12: --FILE--
        !            13: <?php
        !            14: 
        !            15: echo "*** Test by calling function with permission error ***\n";
        !            16: 
        !            17: posix_setuid(0);
        !            18: var_dump(posix_errno());
        !            19: 
        !            20: ?>
        !            21: --EXPECTF--
        !            22: *** Test by calling function with permission error ***
        !            23: int(1)

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