dba_gdbm.phpt 768 B

123456789101112131415161718192021222324252627282930313233343536
  1. --TEST--
  2. DBA GDBM handler test
  3. --EXTENSIONS--
  4. dba
  5. --SKIPIF--
  6. <?php
  7. $handler = 'gdbm';
  8. require_once __DIR__ .'/skipif.inc';
  9. ?>
  10. --FILE--
  11. <?php
  12. $handler = 'gdbm';
  13. require_once __DIR__ .'/test.inc';
  14. $lock_flag = ''; // lock in library
  15. require_once __DIR__ .'/dba_handler.inc';
  16. // Read during write is system dependent. Important is that there is no deadlock
  17. ?>
  18. --EXPECTF--
  19. database handler: gdbm
  20. 3NYNYY
  21. Content String 2
  22. Content 2 replaced
  23. Read during write:%sallowed
  24. "key number 6" written
  25. Failed to write "key number 6" 2nd time
  26. Content 2 replaced 2nd time
  27. The 6th value
  28. array(3) {
  29. ["key number 6"]=>
  30. string(13) "The 6th value"
  31. ["key2"]=>
  32. string(27) "Content 2 replaced 2nd time"
  33. ["key5"]=>
  34. string(23) "The last content string"
  35. }