Debian Codegraph @

test/atomic.test

raw
1 # 2015-11-07
2 #
3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
5 #
6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give.
9 #
10 #***********************************************************************
11 # This file implements regression tests for SQLite library. The
12 # focus of this file is testing the WITH clause.
13 #
14
15 set testdir [file dirname $argv0]
16 source $testdir/tester.tcl
17 set ::testprefix atomic
18
19 db close
20 if {[atomic_batch_write test.db]==0} {
21 puts "No f2fs atomic-batch-write support. Skipping tests..."
22 finish_test
23 return
24 }
25
26 reset_db
27
28 do_execsql_test 1.0 {
29 CREATE TABLE t1(x, y);
30 BEGIN;
31 INSERT INTO t1 VALUES(1, 2);
32 }
33
34 do_test 1.1 { file exists test.db-journal } {0}
35
36 do_execsql_test 1.2 {
37 COMMIT;
38 }
39
40
41 finish_test