diff options
author | drh <drh@noemail.net> | 2007-01-29 15:50:05 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2007-01-29 15:50:05 +0000 |
commit | 63cf66f02ea088c7284c3fbfab879f48ceadc20a (patch) | |
tree | 21306843a35e4c59c3983208976508ad3d068b0c /test/func.test | |
parent | 5fecee1557ea4b41214df5bce3bc0e1436ad2de0 (diff) | |
download | sqlite-63cf66f02ea088c7284c3fbfab879f48ceadc20a.tar.gz sqlite-63cf66f02ea088c7284c3fbfab879f48ceadc20a.zip |
Add the randomhex() function as a built-in. (CVS 3619)
FossilOrigin-Name: a6001589ab1349f7a6b4af941e9e0fd73d13c1c0
Diffstat (limited to 'test/func.test')
-rw-r--r-- | test/func.test | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/test/func.test b/test/func.test index 4eca470b7..ae3362372 100644 --- a/test/func.test +++ b/test/func.test @@ -11,7 +11,7 @@ # This file implements regression tests for SQLite library. The # focus of this file is testing built-in functions. # -# $Id: func.test,v 1.55 2006/09/16 21:45:14 drh Exp $ +# $Id: func.test,v 1.56 2007/01/29 15:50:06 drh Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl @@ -296,6 +296,28 @@ do_test func-9.1 { SELECT random() is not null; } } {1} +do_test func-9.2 { + execsql { + SELECT typeof(random()); + } +} {integer} +do_test func-9.3 { + execsql { + SELECT randomhex(32) is not null; + } +} {1} +do_test func-9.4 { + execsql { + SELECT typeof(randomhex(32)); + } +} {text} +do_test func-9.5 { + execsql { + SELECT length(randomhex(32)), length(randomhex(-5)), + length(randomhex(2000)), length(randomhex(31)); + } +} {32 2 1000 32} + # Use the "sqlite_register_test_function" TCL command which is part of # the text fixture in order to verify correct operation of some of |