aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/func.test21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/func.test b/test/func.test
index ae3362372..9ccd8e180 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.56 2007/01/29 15:50:06 drh Exp $
+# $Id: func.test,v 1.57 2007/01/29 17:58:28 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@@ -303,21 +303,28 @@ do_test func-9.2 {
} {integer}
do_test func-9.3 {
execsql {
- SELECT randomhex(32) is not null;
+ SELECT randomblob(32) is not null;
}
} {1}
do_test func-9.4 {
execsql {
- SELECT typeof(randomhex(32));
+ SELECT typeof(randomblob(32));
}
-} {text}
+} {blob}
do_test func-9.5 {
execsql {
- SELECT length(randomhex(32)), length(randomhex(-5)),
- length(randomhex(2000)), length(randomhex(31));
+ SELECT length(randomblob(32)), length(randomblob(-5)),
+ length(randomblob(2000))
}
-} {32 2 1000 32}
+} {32 1 2000}
+# The "hex()" function was added in order to be able to render blobs
+# generated by randomblob(). So this seems like a good place to test
+# hex().
+#
+do_test func-9.10 {
+ execsql {SELECT hex(x'00112233445566778899aAbBcCdDeEfF')}
+} {00112233445566778899AABBCCDDEEFF}
# Use the "sqlite_register_test_function" TCL command which is part of
# the text fixture in order to verify correct operation of some of