diff options
Diffstat (limited to 'ext/dba/tests/bug38698.phpt')
-rwxr-xr-x | ext/dba/tests/bug38698.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt new file mode 100755 index 000000000..56dde8526 --- /dev/null +++ b/ext/dba/tests/bug38698.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) +--SKIPIF-- +<?php + $handler = 'cdb_make'; + require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--FILE-- +<?php + +$db_file = dirname(__FILE__) .'/129php.cdb'; + +if (($db_make=dba_open($db_file, "n", 'cdb_make'))!==FALSE) { + dba_insert(pack('i',129), "Booo!", $db_make); + dba_close($db_make); + // write md5 checksum of generated database file + var_dump(md5_file($db_file)); + @unlink($db_file); +} else { + echo "Error creating database\n"; +} +?> +===DONE=== +--EXPECT-- +string(32) "1f34b74bde3744265acfc21e0f30af95" +===DONE=== |