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

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

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