xref: /PHP-7.4/ext/dba/tests/dba_tcadb.phpt (revision 96dd310c)
1--TEST--
2DBA TCADB handler test
3--SKIPIF--
4<?php
5	$handler = 'tcadb';
6	require_once __DIR__ .'/skipif.inc';
7?>
8--FILE--
9<?php
10    $handler = 'tcadb';
11    $lock_flag = 'l';
12    $db_filename = $db_file = __DIR__ .'/test0.tch';
13    @unlink($db_filename);
14    @unlink($db_filename.'.lck');
15	require_once __DIR__ .'/dba_handler.inc';
16?>
17===DONE===
18--CLEAN--
19<?php
20$db_filename = $db_file = __DIR__ .'/test0.tch';
21@unlink($db_filename);
22@unlink($db_filename.'.lck');
23?>
24--EXPECT--
25database handler: tcadb
263NYNYY
27Content String 2
28Content 2 replaced
29Read during write: not allowed
30"key number 6" written
31Failed to write "key number 6" 2nd time
32Content 2 replaced 2nd time
33The 6th value
34array(3) {
35  ["key number 6"]=>
36  string(13) "The 6th value"
37  ["key2"]=>
38  string(27) "Content 2 replaced 2nd time"
39  ["key5"]=>
40  string(23) "The last content string"
41}
42--NO-LOCK--
433NYNYY
44Content String 2
45Content 2 replaced
46Read during write: not allowed
47"key number 6" written
48Failed to write "key number 6" 2nd time
49Content 2 replaced 2nd time
50The 6th value
51array(3) {
52  ["key number 6"]=>
53  string(13) "The 6th value"
54  ["key2"]=>
55  string(27) "Content 2 replaced 2nd time"
56  ["key5"]=>
57  string(23) "The last content string"
58}
59===DONE===
60