aboutsummaryrefslogtreecommitdiff
path: root/test/func.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/func.test')
-rw-r--r--test/func.test24
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