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