Add the randomhex() function as a built-in. (CVS 3619)

FossilOrigin-Name: a6001589ab1349f7a6b4af941e9e0fd73d13c1c0
diff --git a/test/func.test b/test/func.test
index 4eca470..ae33623 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 @@
     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