helly Fri Nov 15 11:39:36 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/ext/dba/tests dba001.phpt dba002.phpt dba003.phpt dba004.phpt
dba005.phpt dba006.phpt dba007.phpt dba008.phpt
skipif.inc test.inc
Log:
MFH: info about handler used and use flatfile if available
Index: php4/ext/dba/tests/dba001.phpt
diff -u php4/ext/dba/tests/dba001.phpt:1.2 php4/ext/dba/tests/dba001.phpt:1.2.2.1
--- php4/ext/dba/tests/dba001.phpt:1.2 Fri Nov 1 09:21:35 2002
+++ php4/ext/dba/tests/dba001.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba002.phpt
diff -u php4/ext/dba/tests/dba002.phpt:1.2 php4/ext/dba/tests/dba002.phpt:1.2.2.1
--- php4/ext/dba/tests/dba002.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba002.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba003.phpt
diff -u php4/ext/dba/tests/dba003.phpt:1.2 php4/ext/dba/tests/dba003.phpt:1.2.2.1
--- php4/ext/dba/tests/dba003.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba003.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba004.phpt
diff -u php4/ext/dba/tests/dba004.phpt:1.2 php4/ext/dba/tests/dba004.phpt:1.2.2.1
--- php4/ext/dba/tests/dba004.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba004.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba005.phpt
diff -u php4/ext/dba/tests/dba005.phpt:1.2 php4/ext/dba/tests/dba005.phpt:1.2.2.1
--- php4/ext/dba/tests/dba005.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba005.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba006.phpt
diff -u php4/ext/dba/tests/dba006.phpt:1.2 php4/ext/dba/tests/dba006.phpt:1.2.2.1
--- php4/ext/dba/tests/dba006.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba006.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba007.phpt
diff -u php4/ext/dba/tests/dba007.phpt:1.2 php4/ext/dba/tests/dba007.phpt:1.2.2.1
--- php4/ext/dba/tests/dba007.phpt:1.2 Fri Nov 1 09:21:36 2002
+++ php4/ext/dba/tests/dba007.phpt Fri Nov 15 11:39:36 2002
@@ -4,6 +4,7 @@
<?php
require_once('skipif.inc');
if (!function_exists('dba_list')) die('skip dba_list() not available');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/dba008.phpt
diff -u php4/ext/dba/tests/dba008.phpt:1.1.2.1 php4/ext/dba/tests/dba008.phpt:1.1.2.2
--- php4/ext/dba/tests/dba008.phpt:1.1.2.1 Thu Nov 14 16:52:22 2002
+++ php4/ext/dba/tests/dba008.phpt Fri Nov 15 11:39:36 2002
@@ -3,6 +3,7 @@
--SKIPIF--
<?php
require_once('skipif.inc');
+ die("info $HND handler used");
?>
--FILE--
<?php
Index: php4/ext/dba/tests/skipif.inc
diff -u php4/ext/dba/tests/skipif.inc:1.3 php4/ext/dba/tests/skipif.inc:1.3.2.1
--- php4/ext/dba/tests/skipif.inc:1.3 Wed Nov 6 06:59:14 2002
+++ php4/ext/dba/tests/skipif.inc Fri Nov 15 11:39:36 2002
@@ -2,14 +2,19 @@
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 (in_array('flatfile', $handler)) {
+ $handler = 'flatfile';
+ } elseif ($handler[0]=='cdb') { // CDB currently supports only reading
if (count($handler)==1) {
die('skip CDB currently supports only reading');
}
if ($handler[1]=='cdb_make' && count($handler)==2) {
die('skip CDB currently supports only reading and creating');
}
+ $handler = $handler[1];
+ } else {
+ $handler = $handler[0];
}
+ $HND = strtoupper($handler);
?>
Index: php4/ext/dba/tests/test.inc
diff -u php4/ext/dba/tests/test.inc:1.7 php4/ext/dba/tests/test.inc:1.7.2.1
--- php4/ext/dba/tests/test.inc:1.7 Mon Nov 11 07:00:58 2002
+++ php4/ext/dba/tests/test.inc Fri Nov 15 11:39:36 2002
@@ -1,8 +1,9 @@
<?php
$db_filename = $db_file = dirname(__FILE__).'/test0.dbm';
$handler = dba_handlers();
- // CDB currently supports only reading
- if ($handler[0]=='cdb') {
+ if (in_array('flatfile', $handler)) {
+ $handler = 'flatfile';
+ } elseif ($handler[0]=='cdb') { // CDB currently supports only reading
if (count($handler)==1) {
die('CDB currently supports only reading ');
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php