uw              Thu Jul 12 21:02:22 2007 UTC

  Modified files:              
    /php-src/ext/mysqli/tests   060.phpt 061.phpt 062.phpt 063.phpt 
                                064.phpt 065.phpt 066.phpt 067.phpt 
                                068.phpt 069.phpt 070.phpt 071.phpt 
                                072.phpt 073.phpt 074.phpt 
  Log:
  The last bunch of changes to the old 0*.phpt tests. Once final time a 
  verbose explanation of changes:
  
       - take connection parameter from connect.inc
       - use proper UEXPECTF
       - have 'print "done!"' or similar at the end to detect crashes
       - whitespace changes where needed
       - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0
       - understand return value checking as sometime that makes you type
         more when you write but makes you happy when you debug
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/060.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqli/tests/060.phpt
diff -u php-src/ext/mysqli/tests/060.phpt:1.5 
php-src/ext/mysqli/tests/060.phpt:1.6
--- php-src/ext/mysqli/tests/060.phpt:1.5       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/060.phpt   Thu Jul 12 21:02:21 2007
@@ -5,21 +5,21 @@
 --FILE--
 <?php
        include "connect.inc";
-       
+
        class test_class {
                function __construct($arg1, $arg2) {
                        echo __METHOD__ . "($arg1,$arg2)\n";
                }
        }
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd);
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
-       mysqli_select_db($link, "test");
+       mysqli_select_db($link, $db);
        mysqli_query($link, "SET sql_mode=''");
 
-       mysqli_query($link,"DROP TABLE IF EXISTS test_fetch");
-       mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned,
+       mysqli_query($link,"DROP TABLE IF EXISTS test_fetch");
+       mysqli_query($link,"CREATE TABLE test_fetch(c1 smallint unsigned,
                                                      c2 smallint unsigned,
                                                      c3 smallint,
                                                      c4 smallint,
@@ -27,16 +27,16 @@
                                                      c6 smallint unsigned,
                                                      c7 smallint)");
 
-       mysqli_query($link, "INSERT INTO test_fetch VALUES ( -23, 35999, NULL, 
-500, -9999999, -0, 0)"); 
+       mysqli_query($link, "INSERT INTO test_fetch VALUES ( -23, 35999, NULL, 
-500, -9999999, -0, 0)");
 
-       $result = mysqli_query($link, "SELECT * FROM test_bind_fetch");
+       $result = mysqli_query($link, "SELECT * FROM test_fetch");
        $test = mysqli_fetch_object($result, 'test_class', array(1, 2));
        mysqli_free_result($result);
 
        var_dump($test);
 
        mysqli_close($link);
-       
+
        echo "Done\n";
 ?>
 --EXPECTF--
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/061.phpt?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/mysqli/tests/061.phpt
diff -u php-src/ext/mysqli/tests/061.phpt:1.6 
php-src/ext/mysqli/tests/061.phpt:1.7
--- php-src/ext/mysqli/tests/061.phpt:1.6       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/061.phpt   Thu Jul 12 21:02:21 2007
@@ -10,34 +10,49 @@
                $buffer = strrev(fread($fp, $buflen));
                return(strlen($buffer));
        }
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $link = mysqli_connect($host, $user, $passwd, "test");
+       $link = mysqli_connect($host, $user, $passwd, $db, $port, $socket);
 
        /* create temporary file */
        $filename = dirname(__FILE__) . "061.csv";
        $fp = fopen($filename, "w");
-       @fwrite($fp, "foo;bar");
+       fwrite($fp, b"foo;bar");
        fclose($fp);
 
-       mysqli_query($link,"DROP TABLE IF EXISTS t_061");
-       mysqli_query($link,"CREATE TABLE t_061 (c1 varchar(10), c2 
varchar(10))");
+       if (!mysqli_query($link,"DROP TABLE IF EXISTS t_061"))
+               printf("Cannot drop table: [%d] %s\n", mysqli_errno($link), 
mysqli_error($link));
+       if (!mysqli_query($link,"CREATE TABLE t_061 (c1 varchar(10), c2 
varchar(10))"))
+               printf("Cannot create table: [%d] %s\n", mysqli_errno($link), 
mysqli_error($link));
 
-       mysqli_query($link, "LOAD DATA LOCAL INFILE '{$filename}' INTO TABLE 
t_061 FIELDS TERMINATED BY ';'"); 
+       if (!mysqli_query($link, sprintf("LOAD DATA LOCAL INFILE '%s' INTO 
TABLE t_061 FIELDS TERMINATED BY ';'", mysqli_real_escape_string($link, 
$filename))))
+               printf("Cannot load data: [%d] %s\n", mysqli_errno($link), 
mysqli_error($link));
 
        mysqli_set_local_infile_handler($link, "my_read");
-       mysqli_query($link, "LOAD DATA LOCAL INFILE '{$filename}' INTO TABLE 
t_061 FIELDS TERMINATED BY ';'"); 
+       if (!mysqli_query($link, sprintf("LOAD DATA LOCAL INFILE '%s' INTO 
TABLE t_061 FIELDS TERMINATED BY ';'", mysqli_real_escape_string($link, 
$filename))))
+               printf("Cannot load data using infile handler: [%d] %s\n", 
mysqli_errno($link), mysqli_error($link));
 
        if ($result = mysqli_query($link, "SELECT c1,c2 FROM t_061")) {
                while (($row = mysqli_fetch_row($result))) {
                        printf("%s-%s\n", $row[0], $row[1]);
+                       printf("%s-%s\n", gettype($row[0]), gettype($row[1]));
                }
                mysqli_free_result($result);
        }
 
        mysqli_close($link);
        unlink($filename);
+       print "done!";
 ?>
 --EXPECT--
 foo-bar
+string-string
+rab-oof
+string-string
+done!
+--UEXPECTF--
+foo-bar
+unicode-unicode
 rab-oof
+unicode-unicode
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/062.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/062.phpt
diff -u php-src/ext/mysqli/tests/062.phpt:1.2 
php-src/ext/mysqli/tests/062.phpt:1.3
--- php-src/ext/mysqli/tests/062.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/062.phpt   Thu Jul 12 21:02:21 2007
@@ -1,12 +1,12 @@
 --TEST--
-resultset constructor 
+resultset constructor
 --SKIPIF--
 <?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd);
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->real_query("SELECT 'foo' FROM DUAL");
 
@@ -17,9 +17,17 @@
        $mysql->close();
 
        var_dump($row);
+       print "done!";
 ?>
 --EXPECTF--
 array(1) {
   [0]=>
-  %s(3) "foo"
+  string(3) "foo"
 }
+done!
+--UEXPECTF--
+array(1) {
+  [0]=>
+  unicode(3) "foo"
+}
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/063.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/063.phpt
diff -u php-src/ext/mysqli/tests/063.phpt:1.2 
php-src/ext/mysqli/tests/063.phpt:1.3
--- php-src/ext/mysqli/tests/063.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/063.phpt   Thu Jul 12 21:02:21 2007
@@ -6,7 +6,7 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd);
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $stmt = new mysqli_stmt($mysql, "SELECT 'foo' FROM DUAL");
        $stmt->execute();
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/064.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqli/tests/064.phpt
diff -u php-src/ext/mysqli/tests/064.phpt:1.1 
php-src/ext/mysqli/tests/064.phpt:1.2
--- php-src/ext/mysqli/tests/064.phpt:1.1       Thu May  5 13:02:32 2005
+++ php-src/ext/mysqli/tests/064.phpt   Thu Jul 12 21:02:21 2007
@@ -6,7 +6,7 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd);
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $stmt = new mysqli_stmt($mysql, "SELECT NULL FROM DUAL");
        $stmt->execute();
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/065.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/mysqli/tests/065.phpt
diff -u php-src/ext/mysqli/tests/065.phpt:1.5 
php-src/ext/mysqli/tests/065.phpt:1.6
--- php-src/ext/mysqli/tests/065.phpt:1.5       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/065.phpt   Thu Jul 12 21:02:21 2007
@@ -14,31 +14,40 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd);
-       mysqli_query($mysql, "SET sql_mode=''");
+       if (!$mysql = new mysqli($host, $user, $passwd, $db, $port, $socket))
+          printf("[001] [%d] %s\n", mysqli_connect_errno(), 
mysqli_connect_error());
+          
+       if (!mysqli_query($mysql, "SET sql_mode=''"))
+          printf("[002] Cannot set SQL-Mode, [%d] %s\n", mysqli_errno($mysql), 
mysqli_error($mysql));
 
        $esc_str = chr(0xbf) . chr(0x5c);
+       $len = $charset = array();
+       $tmp = null;
 
        if ($mysql->set_charset("latin1")) {
                /* 5C should be escaped */
-               $len[0] = strlen($mysql->real_escape_string($esc_str));
-               $charset[0] = $mysql->client_encoding();
+               if (3 !== ($tmp = strlen($mysql->real_escape_string($esc_str))))
+                 printf("[003] Expecting 3/int got %s/%s\n", gettype($tmp), 
$tmp);
+                 
+               if ('latin1' !== ($tmp = $mysql->client_encoding()))
+                 printf("[004] Expecting latin1/string got %s/%s\n", 
gettype($tmp), $tmp);
        }
 
-       if ($mysql->set_charset("gbk")) {
-               /* nothing should be escaped, it's a valid gbk character */
-               $len[1] = strlen($mysql->real_escape_string($esc_str));
-               $charset[1] = $mysql->client_encoding();
+       if ($res = $mysql->query("SHOW CHARACTER SET LIKE 'gbk'")) {
+          $res->free_result();
+          if ($mysql->set_charset("gbk")) {
+                 /* nothing should be escaped, it's a valid gbk character */
+               
+                 if (2 !== ($tmp = 
strlen($mysql->real_escape_string($esc_str))))
+                     printf("[005] Expecting 2/int got %s/%s\n", 
gettype($tmp), $tmp);
+                 
+                 if ('gbk' !== ($tmp = $mysql->client_encoding()))
+                     printf("[005] Expecting gbk/string got %s/%s\n", 
gettype($tmp), $tmp);;
+          }
        }
-
        $mysql->close();
-       var_dump($len[0]);
-       var_dump($len[1]);
-       var_dump($charset[0]);
-       var_dump($charset[1]);
+       
+       print "done!";  
 ?>
 --EXPECT--
-int(3)
-int(2)
-string(6) "latin1"
-string(3) "gbk"
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/066.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqli/tests/066.phpt
diff -u php-src/ext/mysqli/tests/066.phpt:1.1 
php-src/ext/mysqli/tests/066.phpt:1.2
--- php-src/ext/mysqli/tests/066.phpt:1.1       Wed Jun 22 10:15:37 2005
+++ php-src/ext/mysqli/tests/066.phpt   Thu Jul 12 21:02:21 2007
@@ -6,16 +6,16 @@
 <?php
 
        include "connect.inc";
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->query("DROP TABLE IF EXISTS test_warnings");
 
-       $mysql->query("CREATE TABLE test_warnings (a int not null)");
+       $mysql->query("CREATE TABLE test_warnings (a int not null) 
ENGINE=myisam");
 
        $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)");
-       
+
        if (($warning = new mysqli_warning($mysql))) {
                do {
                        printf("Warning\n");
@@ -23,6 +23,8 @@
        }
 
        $mysql->close();
+       print "done!";
 ?>
 --EXPECT--
 Warning
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/067.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqli/tests/067.phpt
diff -u php-src/ext/mysqli/tests/067.phpt:1.1 
php-src/ext/mysqli/tests/067.phpt:1.2
--- php-src/ext/mysqli/tests/067.phpt:1.1       Wed Jun 22 10:14:32 2005
+++ php-src/ext/mysqli/tests/067.phpt   Thu Jul 12 21:02:21 2007
@@ -1,38 +1,50 @@
 --TEST--
 function test: nested selects (cursors)
 --SKIPIF--
-<?php 
-       require_once('skipif.inc'); 
+<?php
+       require_once('skipif.inc');
+       include "connect.inc";
+
+       if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+               die("skip Cannot connect to check required version");
+
        /* skip cursor test for versions < 50004 */
-       if (mysqli_get_client_version() < 50009) {
-               die("skip Client library doesn't support cursors");     
+       if ((!$IS_MYSQLND && mysqli_get_client_version() < 50009) ||
+            (mysqli_get_server_version($link) < 50009)) {
+                 die(sprintf("skip Client library doesn't support cursors 
(%s/%s)",
+                     mysqli_get_client_version(), 
mysqli_get_server_version($link));
        }
+       mysqli_close($link);
 ?>
 --FILE--
 <?php
 
        function open_cursor($mysql, $query) {
-               $stmt = $mysql->prepare($query);
+               if (!is_object($stmt = $mysql->prepare($query))) {
+                 printf("[001] Cannot create statement object for '%s', [%d] 
%s\n",
+                     $query, $mysql->errno, $mysql->error);
+               }
+
                $stmt->attr_set(MYSQLI_STMT_ATTR_CURSOR_TYPE, 
MYSQLI_CURSOR_TYPE_READ_ONLY);
                return $stmt;
        }
 
        include "connect.inc";
        $a = array();
-       
+
        /*** test mysqli_connect 127.0.0.1 ***/
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        for ($i=0;$i < 3; $i++) {
                $mysql->query("DROP TABLE IF EXISTS cursor$i");
-               $mysql->query("CREATE TABLE cursor$i (a int not null)");
+               $mysql->query("CREATE TABLE cursor$i (a int not null) ENGINE=" 
. $engine);
                $mysql->query("INSERT INTO cursor$i VALUES 
(1),(2),(3),(4),(5),(6)");
                $stmt[$i] = open_cursor($mysql, "SELECT a FROM cursor$i");
                $stmt[$i]->execute();
                $stmt[$i]->bind_result($a[$i]);
        }
 
-       
+
        $cnt = 0;
        while ($stmt[0]->fetch()) {
                $stmt[1]->fetch();
@@ -48,4 +60,4 @@
        var_dump($cnt);
 ?>
 --EXPECT--
-int(63)
+int(63)
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/068.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/068.phpt
diff -u php-src/ext/mysqli/tests/068.phpt:1.2 
php-src/ext/mysqli/tests/068.phpt:1.3
--- php-src/ext/mysqli/tests/068.phpt:1.2       Sun Oct  1 21:01:31 2006
+++ php-src/ext/mysqli/tests/068.phpt   Thu Jul 12 21:02:21 2007
@@ -1,13 +1,11 @@
 --TEST--
 mysqli get_client_info
 --SKIPIF--
-<?php 
-       require_once('skipif.inc'); 
-?>
+<?php  require_once('skipif.inc'); ?>
 --FILE--
 <?php
-  $s = mysqli_get_client_info();
-  echo gettype($s);
+       $s = mysqli_get_client_info();
+       echo gettype($s);
 ?>
 --EXPECT--
 string
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/069.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/069.phpt
diff -u php-src/ext/mysqli/tests/069.phpt:1.2 
php-src/ext/mysqli/tests/069.phpt:1.3
--- php-src/ext/mysqli/tests/069.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/069.phpt   Thu Jul 12 21:02:21 2007
@@ -6,29 +6,40 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        $mysql->multi_query('SELECT 1;SELECT 2');
        do {
-               $res = $mysql->store_result();  
+               $res = $mysql->store_result();
                if ($mysql->errno == 0) {
                        while ($arr = $res->fetch_assoc()) {
                                var_dump($arr);
                        }
                        $res->free();
                }
-               if ($mysql->more_results()) {
-                       echo "---\n";
+               if (!$mysql->more_results()) {
+                       break;
                }
-       } while ($mysql->next_result());
+       } while (@$mysql->next_result());
        $mysql->close();
+       print "done!";
 ?>
 --EXPECTF--
 array(1) {
   [1]=>
-  %s(1) "1"
+  string(1) "1"
 }
----
 array(1) {
   [2]=>
-  %s(1) "2"
+  string(1) "2"
 }
+done!
+--UEXPECTF--
+array(1) {
+  [1]=>
+  unicode(1) "1"
+}
+array(1) {
+  [2]=>
+  unicode(1) "2"
+}
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/070.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/mysqli/tests/070.phpt
diff -u php-src/ext/mysqli/tests/070.phpt:1.1 
php-src/ext/mysqli/tests/070.phpt:1.2
--- php-src/ext/mysqli/tests/070.phpt:1.1       Tue Jul 11 07:04:31 2006
+++ php-src/ext/mysqli/tests/070.phpt   Thu Jul 12 21:02:21 2007
@@ -6,9 +6,11 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
        var_dump($mysql->ping());
        $mysql->close();
+       print "done!";
 ?>
 --EXPECT--
 bool(true)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/071.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/mysqli/tests/071.phpt
diff -u php-src/ext/mysqli/tests/071.phpt:1.4 
php-src/ext/mysqli/tests/071.phpt:1.5
--- php-src/ext/mysqli/tests/071.phpt:1.4       Tue Jul 11 23:34:27 2006
+++ php-src/ext/mysqli/tests/071.phpt   Thu Jul 12 21:02:21 2007
@@ -7,7 +7,7 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        var_dump($mysql->ping());
 
@@ -17,7 +17,7 @@
 
        $mysql->close();
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        var_dump(mysqli_ping($mysql));
 
@@ -26,6 +26,7 @@
        var_dump(mysqli_ping($mysql));
 
        $mysql->close();
+       print "done!";
 ?>
 --EXPECT--
 bool(true)
@@ -34,3 +35,4 @@
 bool(true)
 bool(true)
 bool(false)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/072.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/072.phpt
diff -u php-src/ext/mysqli/tests/072.phpt:1.2 
php-src/ext/mysqli/tests/072.phpt:1.3
--- php-src/ext/mysqli/tests/072.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/072.phpt   Thu Jul 12 21:02:21 2007
@@ -6,7 +6,7 @@
 <?php
        include "connect.inc";
 
-       $mysql = new mysqli($host, $user, $passwd, "test");
+       $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
        $mysql->query("DROP TABLE IF EXISTS not_exists");
 
@@ -19,9 +19,17 @@
        var_dump($w->sqlstate);
 
        $mysql->close();
+       echo "done!"
 ?>
---EXPECT--
+--EXPECTF--
 int(1)
 int(1051)
 string(26) "Unknown table 'not_exists'"
 string(5) "HY000"
+done!
+--UEXPECTF--
+int(1)
+int(1051)
+unicode(26) "Unknown table 'not_exists'"
+unicode(5) "HY000"
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/073.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/073.phpt
diff -u php-src/ext/mysqli/tests/073.phpt:1.2 
php-src/ext/mysqli/tests/073.phpt:1.3
--- php-src/ext/mysqli/tests/073.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/073.phpt   Thu Jul 12 21:02:21 2007
@@ -6,18 +6,27 @@
 <?php
        include "connect.inc";
 
-    var_dump( $driver->embedded);
-    var_dump( $driver->client_version);
-    var_dump( $driver->client_info);
-    var_dump( $driver->driver_version);
-       var_dump( $driver->reconnect);
-       var_dump( $driver->report_mode);
-    
+       var_dump($driver->embedded);
+       var_dump($driver->client_version);
+       var_dump($driver->client_info);
+       var_dump($driver->driver_version);
+       var_dump($driver->reconnect);
+       var_dump($driver->report_mode);
+       print "done!";
 ?>
 --EXPECTF--
 bool(%s)
 int(%d)
-%s(%d) "%s"
+string(%d) "%s"
 int(%d)
 bool(%s)
 int(%d)
+done!
+--UEXPECTF--
+bool(%s)
+int(%d)
+unicode(%d) "%s"
+int(%d)
+bool(%s)
+int(%d)
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/074.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/mysqli/tests/074.phpt
diff -u php-src/ext/mysqli/tests/074.phpt:1.2 
php-src/ext/mysqli/tests/074.phpt:1.3
--- php-src/ext/mysqli/tests/074.phpt:1.2       Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/074.phpt   Thu Jul 12 21:02:21 2007
@@ -1,33 +1,42 @@
 --TEST--
 mysqli_autocommit() tests
 --SKIPIF--
-<?php 
-       require_once('skipif.inc'); 
-?>
+<?php require_once('skipif.inc'); ?>
 --FILE--
 <?php
 
-include "connect.inc";
+       include "connect.inc";
 
-$mysqli = new mysqli($host, $user, $passwd, "test");
+       $mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket);
 
-var_dump($mysqli->autocommit(false));
-$result = $mysqli->query("SELECT @@autocommit");
-var_dump($result->fetch_row());
+       var_dump($mysqli->autocommit(false));
+       $result = $mysqli->query("SELECT @@autocommit");
+       var_dump($result->fetch_row());
 
-var_dump($mysqli->autocommit(true));
-$result = $mysqli->query("SELECT @@autocommit");
-var_dump($result->fetch_row());
+       var_dump($mysqli->autocommit(true));
+       $result = $mysqli->query("SELECT @@autocommit");
+       var_dump($result->fetch_row());
 
 ?>
 --EXPECTF--
 bool(true)
 array(1) {
   [0]=>
-  %s(1) "0"
+  string(1) "0"
+}
+bool(true)
+array(1) {
+  [0]=>
+  string(1) "1"
 }
+--UEXPECTF--
 bool(true)
 array(1) {
   [0]=>
-  %s(1) "1"
+  unicode(1) "0"
 }
+bool(true)
+array(1) {
+  [0]=>
+  unicode(1) "1"
+}
\ No newline at end of file

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

Reply via email to