xref: /PHP-8.1/ext/dba/tests/dba_gdbm.phpt (revision b5a14e6c)
1--TEST--
2DBA GDBM handler test
3--EXTENSIONS--
4dba
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
17    // Read during write is system dependent. Important is that there is no deadlock
18?>
19--EXPECTF--
20database handler: gdbm
213NYNYY
22Content String 2
23Content 2 replaced
24Read during write:%sallowed
25"key number 6" written
26Failed to write "key number 6" 2nd time
27Content 2 replaced 2nd time
28The 6th value
29array(3) {
30  ["key number 6"]=>
31  string(13) "The 6th value"
32  ["key2"]=>
33  string(27) "Content 2 replaced 2nd time"
34  ["key5"]=>
35  string(23) "The last content string"
36}
37