georg           Mon Feb 17 18:29:59 2003 EDT

  Added files:                 
    /php4/ext/mysqli/tests      050.phpt 051.phpt 052.phpt 053.phpt 054.phpt 
                                055.phpt 
  Log:
  additional tests for non freed objects
  
  

Index: php4/ext/mysqli/tests/050.phpt
+++ php4/ext/mysqli/tests/050.phpt
--TEST--
non freed statement test 
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * non freed stamement
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $stmt = mysqli_prepare($link, "SELECT CURRENT_USER()");
        mysqli_execute($stmt);

        mysqli_close($link);
        printf("Ok\n");
?>
--EXPECT--
Ok

Index: php4/ext/mysqli/tests/051.phpt
+++ php4/ext/mysqli/tests/051.phpt
--TEST--
free statement after close 
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * free statement after close 
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $stmt1 = mysqli_prepare($link, "SELECT CURRENT_USER()");
        mysqli_execute($stmt1);

        mysqli_close($link);
        mysqli_stmt_close($stmt1);
        printf("Ok\n");
?>
--EXPECT--
Ok

Index: php4/ext/mysqli/tests/052.phpt
+++ php4/ext/mysqli/tests/052.phpt
--TEST--
call statement after close
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * statement call  after close 
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");

        mysqli_close($link);
        mysqli_execute($stmt2);
        mysqli_stmt_close($stmt2);
        printf("Ok\n");
?>
--EXPECT--
Ok

Index: php4/ext/mysqli/tests/053.phpt
+++ php4/ext/mysqli/tests/053.phpt
--TEST--
not freed resultset 
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * non freed resultset 
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $result = mysqli_query($link, "SELECT CURRENT_USER()");
        mysqli_close($link);
        printf("Ok\n");

?>
--EXPECT--
Ok

Index: php4/ext/mysqli/tests/054.phpt
+++ php4/ext/mysqli/tests/054.phpt
--TEST--
free resultset after close 
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * free resultset after close 
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $result1 = mysqli_query($link, "SELECT CURRENT_USER()");
        mysqli_close($link);
        mysqli_free_result($result1);
        printf("Ok\n");
?>
--EXPECT--
Ok

Index: php4/ext/mysqli/tests/055.phpt
+++ php4/ext/mysqli/tests/055.phpt
--TEST--
free nothing 
--FILE--
<?php
        include "connect.inc";
        
        /************************
         * don't free anything 
         ************************/
        $link = mysqli_connect("localhost", $user, $passwd);

        $result2 = mysqli_query($link, "SELECT CURRENT_USER()");
        $stmt2 = mysqli_prepare($link, "SELECT CURRENT_USER()");
        printf("Ok\n");
?>
--EXPECT--
Ok



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to