Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Side by Side Diff: third_party/sqlite/src/test/journal3.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/journal2.test ('k') | third_party/sqlite/src/test/jrnlmode.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # 2010 July 15
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.
12 #
13
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
16 source $testdir/lock_common.tcl
17 source $testdir/malloc_common.tcl
18
19 #-------------------------------------------------------------------------
20 # If a connection is required to create a journal file, it creates it with
21 # the same file-system permissions as the database file itself. Test this.
22 #
23 if {$::tcl_platform(platform) == "unix"} {
24
25 set umask [exec /bin/sh -c umask]
26 faultsim_delete_and_reopen
27 do_test journal3-1.1 { execsql { CREATE TABLE tx(y, z) } } {}
28
29 foreach {tn permissions} {
30 1 00644
31 2 00666
32 3 00600
33 4 00755
34 } {
35 db close
36 set effective [format %.5o [expr $permissions & ~$umask]]
37 do_test journal3-1.2.$tn.1 {
38 catch { file delete -force test.db-journal }
39 file attributes test.db -permissions $permissions
40 file attributes test.db -permissions
41 } $permissions
42 do_test journal3-1.2.$tn.2 { file exists test.db-journal } {0}
43 do_test journal3-1.2.$tn.3 {
44 sqlite3 db test.db
45 execsql {
46 BEGIN;
47 INSERT INTO tx DEFAULT VALUES;
48 }
49 file exists test.db-journal
50 } {1}
51 do_test journal3-1.2.$tn.4 {
52 file attr test.db-journal -perm
53 } $effective
54 do_execsql_test journal3-1.2.$tn.5 { ROLLBACK } {}
55 }
56
57
58 }
59
60 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/journal2.test ('k') | third_party/sqlite/src/test/jrnlmode.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698