helly Sun Nov 3 10:22:33 2002 EDT Modified files: /php4/ext/dba/tests dba_cdb.phpt dba_cdb_read.phpt skipif.inc test.inc Log: cdb interface is currently readonly Index: php4/ext/dba/tests/dba_cdb.phpt diff -u php4/ext/dba/tests/dba_cdb.phpt:1.1 php4/ext/dba/tests/dba_cdb.phpt:1.2 --- php4/ext/dba/tests/dba_cdb.phpt:1.1 Fri Nov 1 09:23:23 2002 +++ php4/ext/dba/tests/dba_cdb.phpt Sun Nov 3 10:22:32 2002 @@ -4,6 +4,7 @@ <?php require_once('skipif.inc'); if (!in_array('cdb', dba_handlers())) die('skip CDB handler not available'); + die('skip CDB currently supports only reading'); ?> --FILE-- <?php Index: php4/ext/dba/tests/dba_cdb_read.phpt diff -u php4/ext/dba/tests/dba_cdb_read.phpt:1.1 php4/ext/dba/tests/dba_cdb_read.phpt:1.2 --- php4/ext/dba/tests/dba_cdb_read.phpt:1.1 Sun Nov 3 10:11:42 2002 +++ php4/ext/dba/tests/dba_cdb_read.phpt Sun Nov 3 10:22:32 2002 @@ -2,7 +2,7 @@ DBA CDB handler test (read only) --SKIPIF-- <?php - require_once('skipif.inc'); + if (!extension_loaded('dba')) die('skip dba extension not available'); if (!in_array('cdb', dba_handlers())) die('skip CDB handler not available'); ?> --FILE-- Index: php4/ext/dba/tests/skipif.inc diff -u php4/ext/dba/tests/skipif.inc:1.1 php4/ext/dba/tests/skipif.inc:1.2 --- php4/ext/dba/tests/skipif.inc:1.1 Fri Oct 25 05:42:29 2002 +++ php4/ext/dba/tests/skipif.inc Sun Nov 3 10:22:32 2002 @@ -2,4 +2,11 @@ if (!extension_loaded('dba')) die('skip dba extension not available'); if (!function_exists('dba_handlers')) die ('skip dba_handlers() not available'); if (!sizeof(dba_handlers())) die('skip no handlers installed'); + // CDB currently supports only reading + $handler = dba_handlers(); + if ($handler[0]=='cdb') { + if (count($handler)==1) { + die('skip CDB currently supports only reading '); + } + } ?> Index: php4/ext/dba/tests/test.inc diff -u php4/ext/dba/tests/test.inc:1.2 php4/ext/dba/tests/test.inc:1.3 --- php4/ext/dba/tests/test.inc:1.2 Fri Nov 1 09:20:31 2002 +++ php4/ext/dba/tests/test.inc Sun Nov 3 10:22:32 2002 @@ -1,5 +1,13 @@ <?php $db_file = dirname(__FILE__).'/test0.dbm'; $handler = dba_handlers(); - $handler = $handler[0]; + // CDB currently supports only reading + if ($handler[0]=='cdb') { + if (count($handler)==1) { + die('CDB currently supports only reading '); + } + $handler = $handler[1]; + } else { + $handler = $handler[0]; + } ?>
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php