/ Check-in [08acfc65]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some problems in test scripts. No code changes.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:08acfc65877e207f1a62d31a14afb4add20c4c35
User & Date: dan 2014-01-27 08:48:10
Context
2014-01-27
13:58
Fix (harmless) duplicate variable declaration. check-in: 94ed9bc4 user: drh tags: trunk
08:48
Fix some problems in test scripts. No code changes. check-in: 08acfc65 user: dan tags: trunk
2014-01-25
12:16
Fix a problem causing SQLITE_OMIT_COMPOUND_SELECT builds to fail. check-in: b30db0ac user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/corruptH.test.

62
63
64
65
66
67
68

69
70
71
72
73
74
75

#-------------------------------------------------------------------------
reset_db

# Initialize the database.
#
do_execsql_test 2.1 {

  PRAGMA page_size=1024;

  CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
  INSERT INTO t1 VALUES(1, 'one');
  INSERT INTO t1 VALUES(2, 'two');

  CREATE TABLE t3(x);







>







62
63
64
65
66
67
68
69
70
71
72
73
74
75
76

#-------------------------------------------------------------------------
reset_db

# Initialize the database.
#
do_execsql_test 2.1 {
  PRAGMA auto_vacuum=0;
  PRAGMA page_size=1024;

  CREATE TABLE t1(a INTEGER PRIMARY KEY, b);
  INSERT INTO t1 VALUES(1, 'one');
  INSERT INTO t1 VALUES(2, 'two');

  CREATE TABLE t3(x);

Changes to test/spellfix.test.

230
231
232
233
234
235
236

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265

266
267
268
269
270
271
do_execsql_test 6.1.2 {
  SELECT word, distance FROM t3 WHERE rowid = 10;
} {keener {}}
do_execsql_test 6.1.3 {
  SELECT word, distance FROM t3 WHERE rowid = 10 AND word MATCH 'kiiner';
} {keener 300}


proc trace_callback {sql} {
  if {[string range $sql 0 2] == "-- "} {
    lappend ::trace [string range $sql 3 end]
  }
}

proc do_tracesql_test {tn sql {res {}}} {
  set ::trace [list]
  uplevel [list do_test $tn [subst -nocommands {
    set vals [execsql {$sql}]
    concat [set vals] [set ::trace]
  }] [list {*}$res]]
}

db trace trace_callback
do_tracesql_test 6.2.1 {
  SELECT word FROM t3 WHERE rowid = 10;
} {keener
  {SELECT word, rank, NULL, langid, id FROM "main"."t3_vocab" WHERE rowid=?}
}
do_tracesql_test 6.2.2 {
  SELECT word, distance FROM t3 WHERE rowid = 10;
} {keener {}
  {SELECT word, rank, NULL, langid, id FROM "main"."t3_vocab" WHERE rowid=?}
}
do_tracesql_test 6.2.3 {
  SELECT word, distance FROM t3 WHERE rowid = 10 AND word MATCH 'kiiner';
} {keener 300
  {SELECT id, word, rank, k1  FROM "main"."t3_vocab" WHERE langid=0 AND k2>=?1 AND k2<?2}

}




finish_test







>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>






230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
do_execsql_test 6.1.2 {
  SELECT word, distance FROM t3 WHERE rowid = 10;
} {keener {}}
do_execsql_test 6.1.3 {
  SELECT word, distance FROM t3 WHERE rowid = 10 AND word MATCH 'kiiner';
} {keener 300}

ifcapable trace {
  proc trace_callback {sql} {
    if {[string range $sql 0 2] == "-- "} {
      lappend ::trace [string range $sql 3 end]
    }
  }
  
  proc do_tracesql_test {tn sql {res {}}} {
    set ::trace [list]
    uplevel [list do_test $tn [subst -nocommands {
      set vals [execsql {$sql}]
      concat [set vals] [set ::trace]
    }] [list {*}$res]]
  }
  
  db trace trace_callback
  do_tracesql_test 6.2.1 {
    SELECT word FROM t3 WHERE rowid = 10;
  } {keener
    {SELECT word, rank, NULL, langid, id FROM "main"."t3_vocab" WHERE rowid=?}
  }
  do_tracesql_test 6.2.2 {
    SELECT word, distance FROM t3 WHERE rowid = 10;
  } {keener {}
    {SELECT word, rank, NULL, langid, id FROM "main"."t3_vocab" WHERE rowid=?}
  }
  do_tracesql_test 6.2.3 {
    SELECT word, distance FROM t3 WHERE rowid = 10 AND word MATCH 'kiiner';
  } {keener 300
    {SELECT id, word, rank, k1  FROM "main"."t3_vocab" WHERE langid=0 AND k2>=?1 AND k2<?2}
  }
}




finish_test