3 # May you do good and not evil.
4 # May you find forgiveness for yourself and forgive others.
5 # May you share freely, never taking more than you give.
7 #***********************************************************************
9 # This file contains tests for SQLite. Specifically, it tests that SQLite
10 # does not crash and an error is returned if localhost() fails. This
11 # is the problem reported by ticket bd484a090c.
14 set testdir [file dirname $argv0]
15 source $testdir/tester.tcl
17 set testprefix tkt-bd484a090c
21 lindex [catchsql { SELECT datetime('now', 'localtime') }] 0
24 lindex [catchsql { SELECT datetime('now', 'utc') }] 0
27 sqlite3_test_control SQLITE_TESTCTRL_LOCALTIME_FAULT 1
30 catchsql { SELECT datetime('now', 'localtime') }
31 } {1 {local time unavailable}}
33 catchsql { SELECT datetime('now', 'utc') }
34 } {1 {local time unavailable}}
36 sqlite3_test_control SQLITE_TESTCTRL_LOCALTIME_FAULT 0