diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:35 -0400 |
---|---|---|
committer | Hans-Christoph Steiner <hans@eds.org> | 2014-10-16 22:51:35 -0400 |
commit | 569c6676a6ddb0ff73821d7693b5e18ddef809b9 (patch) | |
tree | 833538da7bba39105daff45e265aef386a200acd /test/date.test | |
parent | 08119c361d1181b3e8f1abb429236e488a664753 (diff) |
Imported Upstream version 3.2.0upstream
Diffstat (limited to 'test/date.test')
-rw-r--r-- | test/date.test | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/date.test b/test/date.test index a30402c..b1d1c67 100644 --- a/test/date.test +++ b/test/date.test @@ -528,4 +528,27 @@ if {0==[sqlite3 -has-codec]} { } {1} } } + +# Verify that multiple calls to date functions with 'now' return the +# same answer. +# +# EVIDENCE-OF: R-34818-13664 The 'now' argument to date and time +# functions always returns exactly the same value for multiple +# invocations within the same sqlite3_step() call. +# +proc sleeper {} {after 100} +do_test date-15.1 { + db func sleeper sleeper + db eval { + SELECT c - a FROM (SELECT julianday('now') AS a, + sleeper(), julianday('now') AS c); + } +} {0.0} +do_test date-15.2 { + db eval { + SELECT a==b FROM (SELECT current_timestamp AS a, + sleeper(), current_timestamp AS b); + } +} {1} + finish_test |