Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix expr.test so that it works when the date-time functions are compiled out of the library. (CVS 2086) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
540ce7de1b3f1882c40d4e20d3986775 |
User & Date: | danielk1977 2004-11-10 12:34:20.000 |
Context
2004-11-10
| ||
15:27 | Ensure the test suite can run with either SQLITE_OMIT_AUTOVACUUM or SQLITE_DEFAULT_AUTOVACUUM=1 defined. (CVS 2087) (check-in: 0747b55882 user: danielk1977 tags: trunk) | |
12:34 | Fix expr.test so that it works when the date-time functions are compiled out of the library. (CVS 2086) (check-in: 540ce7de1b user: danielk1977 tags: trunk) | |
11:55 | Ensure tables cannot be created/dropped when btree cursors are open. (CVS 2085) (check-in: 8e5c2e5df8 user: danielk1977 tags: trunk) | |
Changes
Changes to test/expr.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing expressions. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file implements regression tests for SQLite library. The # focus of this file is testing expressions. # # $Id: expr.test,v 1.38 2004/11/10 12:34:20 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl # Create a table to work with. # execsql {CREATE TABLE test1(i1 int, i2 int, r1 real, r2 real, t1 text, t2 text)} |
︙ | ︙ | |||
476 477 478 479 480 481 482 | # Test the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP expressions. # set sqlite_current_time [clock seconds] set date [clock format $sqlite_current_time -format %Y-%m-%d -gmt 1] set time [clock format $sqlite_current_time -format %H:%M:%S -gmt 1] do_test expr-8.1 { | | | | | | | > | | | | | | | | | > | 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | # Test the CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP expressions. # set sqlite_current_time [clock seconds] set date [clock format $sqlite_current_time -format %Y-%m-%d -gmt 1] set time [clock format $sqlite_current_time -format %H:%M:%S -gmt 1] do_test expr-8.1 { execsql {SELECT CURRENT_TIME} } $time do_test expr-8.2 { execsql {SELECT CURRENT_DATE} } $date do_test expr-8.3 { execsql {SELECT CURRENT_TIMESTAMP} } [list "$date $time"] ifcapable datetime { do_test expr-8.4 { execsql {SELECT CURRENT_TIME==time('now');} } 1 do_test expr-8.5 { execsql {SELECT CURRENT_DATE==date('now');} } 1 do_test expr-8.6 { execsql {SELECT CURRENT_TIMESTAMP==datetime('now');} } 1 } set sqlite_current_time 0 finish_test |