OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
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 #*********************************************************************** |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 312 |
313 # Here are some tests for tokenize.c. | 313 # Here are some tests for tokenize.c. |
314 # | 314 # |
315 do_test main-3.1 { | 315 do_test main-3.1 { |
316 catch {db close} | 316 catch {db close} |
317 foreach f [glob -nocomplain testdb/*] {forcedelete $f} | 317 foreach f [glob -nocomplain testdb/*] {forcedelete $f} |
318 forcedelete testdb | 318 forcedelete testdb |
319 sqlite3 db testdb | 319 sqlite3 db testdb |
320 set v [catch {execsql {SELECT * from T1 where x!!5}} msg] | 320 set v [catch {execsql {SELECT * from T1 where x!!5}} msg] |
321 lappend v $msg | 321 lappend v $msg |
322 } {1 {unrecognized token: "!!"}} | 322 } {1 {unrecognized token: "!"}} |
323 do_test main-3.2 { | 323 do_test main-3.2 { |
324 catch {db close} | 324 catch {db close} |
325 foreach f [glob -nocomplain testdb/*] {forcedelete $f} | 325 foreach f [glob -nocomplain testdb/*] {forcedelete $f} |
326 forcedelete testdb | 326 forcedelete testdb |
327 sqlite3 db testdb | 327 sqlite3 db testdb |
328 set v [catch {execsql {SELECT * from T1 where ^x}} msg] | 328 set v [catch {execsql {SELECT * from T1 where ^x}} msg] |
329 lappend v $msg | 329 lappend v $msg |
330 } {1 {unrecognized token: "^"}} | 330 } {1 {unrecognized token: "^"}} |
331 do_test main-3.2.2 { | 331 do_test main-3.2.2 { |
332 catchsql {select 'abc} | 332 catchsql {select 'abc} |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 if {[info exists ::env(TEST_FAILURE)]} { | 529 if {[info exists ::env(TEST_FAILURE)]} { |
530 set res 123 | 530 set res 123 |
531 if {$::env(TEST_FAILURE)==0} {set res 234} | 531 if {$::env(TEST_FAILURE)==0} {set res 234} |
532 do_test main-99.1 { | 532 do_test main-99.1 { |
533 bad_behavior $::env(TEST_FAILURE) | 533 bad_behavior $::env(TEST_FAILURE) |
534 set x 123 | 534 set x 123 |
535 } $res | 535 } $res |
536 } | 536 } |
537 | 537 |
538 finish_test | 538 finish_test |
OLD | NEW |