xref: /PHP-5.5/ext/dba/tests/dba_tcadb.phpt (revision eb40f73c)
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--EXPECT--
20database handler: tcadb
213NYNYY
22Content String 2
23Content 2 replaced
24Read during write: not allowed
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--NO-LOCK--
383NYNYY
39Content String 2
40Content 2 replaced
41Read during write: not allowed
42"key number 6" written
43Failed to write "key number 6" 2nd time
44Content 2 replaced 2nd time
45The 6th value
46array(3) {
47  ["key number 6"]=>
48  string(13) "The 6th value"
49  ["key2"]=>
50  string(27) "Content 2 replaced 2nd time"
51  ["key5"]=>
52  string(23) "The last content string"
53}
54===DONE===
55