1--TEST--
2Test function posix_errno() by calling it with with permission error
3--CREDITS--
4Morten Amundsen mor10am@gmail.com
5Francesco 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
15echo "*** Test by calling function with permission error ***\n";
16
17posix_setuid(0);
18var_dump(posix_errno());
19
20?>
21--EXPECTF--
22*** Test by calling function with permission error ***
23int(1)
24