[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test_appname.phpt

2008-11-10 Thread Timm Friebe
thekid  Mon Nov 10 11:52:16 2008 UTC

  Modified files:  
/php-src/ext/sybase_ct/teststest_appname.phpt 
  Log:
  - MFB: Made this test independent of field types in master..sysprocesses
  # char on ASE 11, varchar on ASE 15
  
http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/test_appname.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/ext/sybase_ct/tests/test_appname.phpt
diff -u php-src/ext/sybase_ct/tests/test_appname.phpt:1.2 
php-src/ext/sybase_ct/tests/test_appname.phpt:1.3
--- php-src/ext/sybase_ct/tests/test_appname.phpt:1.2   Sun Feb  6 12:59:03 2005
+++ php-src/ext/sybase_ct/tests/test_appname.phpt   Mon Nov 10 11:52:16 2008
@@ -6,7 +6,7 @@
 ?php
 /* This file is part of PHP test framework for ext/sybase_ct
  *
- * $Id: test_appname.phpt,v 1.2 2005/02/06 12:59:03 thekid Exp $ 
+ * $Id: test_appname.phpt,v 1.3 2008/11/10 11:52:16 thekid Exp $ 
  */
 
   require('test.inc');
@@ -35,9 +35,8 @@
   );
   
   var_dump(
-$r,
-compare_string($program_name, $r[0]['program_name']),
-compare_string($hostname, $r[0]['hostname'])
+compare_string($program_name, $r[0][b'program_name']),
+compare_string($hostname, $r[0][b'hostname'])
   );
  
   sybase_close($db);
@@ -52,14 +51,5 @@
 where
   program_name = phpt_test
  Return: resource
-array(1) {
-  [0]=
-  array(2) {
-[hostname]=
-string(10) php.net%s
-[program_name]=
-string(16) phpt_test%s
-  }
-}
 bool(true)
 bool(true)



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



[PHP-CVS] cvs: php-src /ext/sybase_ct/tests test_appname.phpt

2004-01-23 Thread Timm Friebe
thekid  Fri Jan 23 21:42:27 2004 EDT

  Added files: 
/php-src/ext/sybase_ct/teststest_appname.phpt 
  Log:
  - Initial release
  

http://cvs.php.net/co.php/php-src/ext/sybase_ct/tests/test_appname.phpt?r=1.1p=1
Index: php-src/ext/sybase_ct/tests/test_appname.phpt
+++ php-src/ext/sybase_ct/tests/test_appname.phpt
--TEST--
Sybase-CT application name
--SKIPIF--
?php require('skipif.inc'); ?
--FILE--
?php
/* This file is part of PHP test framework for ext/sybase_ct
 *
 * $Id: test_appname.phpt,v 1.1 2004/01/24 02:42:26 thekid Exp $ 
 */

  require('test.inc');
  
  // {{{ bool compare_string(string expect, string actual)
  // Compares expect to a trimmed version of actual
  function compare_string($expect, $actual) {
$trimmed= rtrim($actual, ' ');
return (0 == strncmp($expect, $trimmed, strlen($trimmed)));
  }
  // }}}

  $program_name= basename(__FILE__, '.php');
  $hostname= 'php.net';
  ini_set('sybct.hostname', $hostname);
  
  $db= sybase_connect_ex(NULL, $program_name);
  $r= sybase_select_ex($db, '
select 
  hostname, 
  program_name
from 
  master..sysprocesses
where
  program_name = '.$program_name.''
  );
  
  var_dump(
$r,
compare_string($program_name, $r[0]['program_name']),
compare_string($hostname, $r[0]['hostname'])
  );
 
  sybase_close($db);
?
--EXPECTF--
 Query: 
select 
  hostname, 
  program_name
from 
  master..sysprocesses
where
  program_name = test_appname
 Return: resource
array(1) {
  [0]=
  array(2) {
[hostname]=
string(10) php.net%s
[program_name]=
string(16) test_appname%s
  }
}
bool(true)
bool(true)

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