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

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

Issue 1610963002: Import SQLite 3.10.2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « third_party/sqlite/src/test/shell2.test ('k') | third_party/sqlite/src/test/shell5.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2010 July 28 1 # 2010 July 28
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
11 # 11 #
12 # The focus of this file is testing the CLI shell tool. 12 # The focus of this file is testing the CLI shell tool.
13 # These tests are specific to the .stats command. 13 # These tests are specific to the .stats command.
14 # 14 #
15 # $Id: shell4.test,v 1.7 2009/07/17 16:54:48 shaneh Exp $ 15 # 2015-03-19: Added tests for .trace
16 #
17 16
18 # Test plan: 17 # Test plan:
19 # 18 #
20 # shell4-1.*: Basic tests specific to the "stats" command. 19 # shell4-1.*: Basic tests specific to the "stats" command.
20 # shell4-2.*: Basic tests for ".trace"
21 # 21 #
22 set testdir [file dirname $argv0] 22 set testdir [file dirname $argv0]
23 source $testdir/tester.tcl 23 source $testdir/tester.tcl
24 if {$tcl_platform(platform)=="windows"} { 24 if {$tcl_platform(platform)=="windows"} {
25 set CLI "sqlite3.exe" 25 set CLI "sqlite3.exe"
26 } else { 26 } else {
27 set CLI "./sqlite3" 27 set CLI "./sqlite3"
28 } 28 }
29 if {![file executable $CLI]} { 29 if {![file executable $CLI]} {
30 finish_test 30 finish_test
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 # make sure stats are present when on 106 # make sure stats are present when on
107 do_test shell4-1.5.2 { 107 do_test shell4-1.5.2 {
108 set res [catchcmd "test.db" {.stats ON 108 set res [catchcmd "test.db" {.stats ON
109 SELECT 1; 109 SELECT 1;
110 }] 110 }]
111 list [regexp {Memory Used} $res] \ 111 list [regexp {Memory Used} $res] \
112 [regexp {Heap Usage} $res] \ 112 [regexp {Heap Usage} $res] \
113 [regexp {Autoindex Inserts} $res] 113 [regexp {Autoindex Inserts} $res]
114 } {1 1 1} 114 } {1 1 1}
115 115
116 do_test shell4-2.1 {
117 catchcmd ":memory:" "CREATE TABLE t1(x);\n.trace"
118 } {1 {Usage: .trace FILE|off}}
119 do_test shell4-2.2 {
120 catchcmd ":memory:" "CREATE TABLE t1(x);\n.trace off\n.trace off\n"
121 } {0 {}}
122 do_test shell4-2.3 {
123 catchcmd ":memory:" ".trace stdout\n.trace\n.trace off\n.dump\n"
124 } {/^1 {PRAGMA.*Usage:.*}$/}
125 ifcapable trace {
126 do_test shell4-2.4 {
127 catchcmd ":memory:" ".trace stdout\nCREATE TABLE t1(x);SELECT * FROM t1;"
128 } {0 {CREATE TABLE t1(x);
129 SELECT * FROM t1;}}
130 do_test shell4-2.5 {
131 catchcmd ":memory:" "CREATE TABLE t1(x);\n.trace stdout\nSELECT * FROM t1;"
132 } {0 {SELECT * FROM t1;}}
133 }
134
135
116 finish_test 136 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/shell2.test ('k') | third_party/sqlite/src/test/shell5.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698