[PHP-CVS] cvs: php-src /ext/mysqli/tests 010.phpt

2008-09-18 Thread Antony Dovgal
tony2001Thu Sep 18 08:40:20 2008 UTC

  Modified files:  
/php-src/ext/mysqli/tests   010.phpt 
  Log:
  fix test
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/010.phpt?r1=1.9r2=1.10diff_format=u
Index: php-src/ext/mysqli/tests/010.phpt
diff -u php-src/ext/mysqli/tests/010.phpt:1.9 
php-src/ext/mysqli/tests/010.phpt:1.10
--- php-src/ext/mysqli/tests/010.phpt:1.9   Tue Jan  8 12:43:08 2008
+++ php-src/ext/mysqli/tests/010.phpt   Thu Sep 18 08:40:20 2008
@@ -63,6 +63,6 @@
   [5]=
   float(1)
   [6]=
-  float(88914608000)
+  float(8.8914608E+14)
 }
-done!
\ No newline at end of file
+done!



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



[PHP-CVS] cvs: php-src /ext/mysqli/tests 010.phpt 011.phpt 012.phpt 013.phpt 014.phpt 015.phpt 016.phpt 017.phpt 018.phpt 019.phpt

2007-07-12 Thread Ulf Wendel
uw  Thu Jul 12 20:42:48 2007 UTC

  Modified files:  
/php-src/ext/mysqli/tests   010.phpt 011.phpt 012.phpt 013.phpt 
014.phpt 015.phpt 016.phpt 017.phpt 
018.phpt 019.phpt 
  Log:
  Next 10 in row to be tweaked:
  
 - 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/010.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/mysqli/tests/010.phpt
diff -u php-src/ext/mysqli/tests/010.phpt:1.6 
php-src/ext/mysqli/tests/010.phpt:1.7
--- php-src/ext/mysqli/tests/010.phpt:1.6   Wed Jan  4 23:04:06 2006
+++ php-src/ext/mysqli/tests/010.phpt   Thu Jul 12 20:42:48 2007
@@ -9,20 +9,23 @@
include connect.inc;

/*** 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_query($link, SET sql_mode='');
+   if (!mysqli_query($link, SET sql_mode=''))
+   printf([001] [%d] %s\n, mysqli_errno($link), 
mysqli_error($link));
 
-   mysqli_query($link,DROP TABLE IF EXISTS test_bind_fetch);
-
-   mysqli_query($link,CREATE TABLE test_bind_fetch(c1 float(3),
- c2 float,
- c3 float unsigned,
- c4 float,
- c5 float,
- c6 float,
- c7 float(10) unsigned));
+   if (!mysqli_query($link, DROP TABLE IF EXISTS test_bind_fetch))
+   printf([002] [%d] %s\n, mysqli_errno($link), 
mysqli_error($link));
+   
+   $rc = mysqli_query($link, CREATE TABLE test_bind_fetch(c1 float(3),
+   
 c2 float,
+   
 c3 float unsigned,
+   
 c4 float,
+   
 c5 float,
+   
 c6 float,  
+   
 c7 float(10) unsigned) ENGINE= . $engine);
+   if (!$rc)
+   printf([003] [%d] %s\n, mysqli_errno($link), 
mysqli_error($link));
 
 
mysqli_query($link, INSERT INTO test_bind_fetch (c1,c2,c3,c4,c5,c6,c7) 
VALUES (3.1415926535,-0.01, -5, ,
@@ -39,6 +42,7 @@
 
mysqli_stmt_close($stmt);
mysqli_close($link);
+   print done!;
 ?
 --EXPECT--
 array(7) {
@@ -57,3 +61,4 @@
   [6]=
   float(88914608000)
 }
+done!
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/011.phpt?r1=1.6r2=1.7diff_format=u
Index: php-src/ext/mysqli/tests/011.phpt
diff -u php-src/ext/mysqli/tests/011.phpt:1.6 
php-src/ext/mysqli/tests/011.phpt:1.7
--- php-src/ext/mysqli/tests/011.phpt:1.6   Tue Sep 26 13:06:13 2006
+++ php-src/ext/mysqli/tests/011.phpt   Thu Jul 12 20:42:48 2007
@@ -9,21 +9,25 @@
include connect.inc;

/*** 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);
+   if (!mysqli_query($link, DROP TABLE IF EXISTS test_bind_result))
+   printf([001] [%d] %s\n, mysqli_errno($link), 
mysqli_error($link));
 
-   mysqli_query($link,DROP TABLE IF EXISTS test_bind_result);
-
-   mysqli_query($link,CREATE TABLE test_bind_result(c1 tinyint, c2 
smallint, 
-c3 int, c4 bigint, 
-c5 float, c6 double,
-c7 varbinary(10), 
-c8 varchar(50)));
-
-   mysqli_query($link,INSERT INTO test_bind_result 
VALUES(19,2999,3999,499,
-  
2345.6,5678.89563,
-