Annotation of embedaddon/php/ext/sysvshm/tests/003.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: shm_detach() tests
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded("sysvshm")) print "skip"; ?>
        !             5: --FILE--
        !             6: <?php
        !             7: 
        !             8: $key = ftok(dirname(__FILE__)."/003.phpt", 'q');
        !             9: 
        !            10: var_dump(shm_detach());
        !            11: var_dump(shm_detach(1,1));
        !            12: 
        !            13: $s = shm_attach($key);
        !            14: 
        !            15: var_dump(shm_detach($s));
        !            16: var_dump(shm_detach($s));
        !            17: shm_remove($s);
        !            18: 
        !            19: var_dump(shm_detach(0));
        !            20: var_dump(shm_detach(1));
        !            21: var_dump(shm_detach(-1));
        !            22: 
        !            23: echo "Done\n";
        !            24: ?>
        !            25: --CLEAN--
        !            26: <?php
        !            27: 
        !            28: $key = ftok(dirname(__FILE__)."/003.phpt", 'q');
        !            29: $s = shm_attach($key);
        !            30: shm_remove($s);
        !            31: 
        !            32: ?>
        !            33: --EXPECTF--    
        !            34: Warning: shm_detach() expects exactly 1 parameter, 0 given in %s003.php on line %d
        !            35: NULL
        !            36: 
        !            37: Warning: shm_detach() expects exactly 1 parameter, 2 given in %s003.php on line %d
        !            38: NULL
        !            39: bool(true)
        !            40: 
        !            41: Warning: shm_detach(): %d is not a valid sysvshm resource in %s003.php on line %d
        !            42: bool(false)
        !            43: 
        !            44: Warning: shm_remove(): %d is not a valid sysvshm resource in %s003.php on line %d
        !            45: 
        !            46: Warning: shm_detach() expects parameter 1 to be resource, integer given in %s003.php on line %d
        !            47: NULL
        !            48: 
        !            49: Warning: shm_detach() expects parameter 1 to be resource, integer given in %s003.php on line %d
        !            50: NULL
        !            51: 
        !            52: Warning: shm_detach() expects parameter 1 to be resource, integer given in %s003.php on line %d
        !            53: NULL
        !            54: Done

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