--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
- echo "database file created with $handler.\n";
+ echo "database file created\n";
+ dba_close($db_file);
} else {
echo "$db_file does not exist\n";
}
- dba_close($db_file);
?>
--EXPECTF--
-database file created with %s.
\ No newline at end of file
+database handler: %s
+database file created
\ No newline at end of file
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file);
echo "Error creating database\n";
}
?>
---EXPECT--
+--EXPECTF--
+database handler: %s
This is a test insert
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "This is a test insert", $db_file);
dba_replace("key1", "This is the replacement text", $db_file);
echo "Error creating database\n";
}
?>
---EXPECT--
+--EXPECTF--
+database handler: %s
This is the replacement text
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
dba_insert("key2", "Content String 2", $db_file);
echo "Error creating database\n";
}
?>
---EXPECT--
+--EXPECTF--
+database handler: %s
Another Content String Content String 2
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
dba_insert("key2", "Content String 2", $db_file);
echo "Error creating database\n";
}
?>
---EXPECT--
+--EXPECTF--
+database handler: %s
5YYYYY
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
dba_insert("key2", "Content String 2", $db_file);
echo "Error creating database\n";
}
?>
---EXPECT--
+--EXPECTF--
+database handler: %s
3NYNYY
\ No newline at end of file
--FILE--
<?php
require_once('test.inc');
+ echo "database handler: $handler\n";
$db_file1 = dirname(__FILE__).'/test1.dbm';
$db_file2 = dirname(__FILE__).'/test2.dbm';
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
- echo "database file created with $handler.\n";
+ echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
if (($db_file1=dba_open($db_file1, "n", $handler))!==FALSE) {
- echo "database file created with $handler.\n";
+ echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
if (($db_file2=dba_open($db_file2, "n", $handler))!==FALSE) {
- echo "database file created with $handler.\n";
+ echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
dba_close($db_file);
?>
--EXPECTF--
-database file created with %s.
+database handler: %s
+database file created
+database file created
+database file created
array(3) {
[%d]=>
- string(%d) "%sext/dba/tests/test.dbm"
+ string(%d) "%sext/dba/tests/test0.dbm"
[%d]=>
string(%d) "%sext/dba/tests/test1.dbm"
[%d]=>