mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Smaller and hopefully faster routine for converting blob literals into binary. (CVS 4967)
FossilOrigin-Name: 92d49499ee3371db64267c7e2ba72a5e12ea76f3
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
#***********************************************************************
|
||||
# This file implements regression tests for SQLite library.
|
||||
#
|
||||
# $Id: blob.test,v 1.6 2008/01/22 23:37:10 drh Exp $
|
||||
# $Id: blob.test,v 1.7 2008/04/04 15:12:22 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -45,6 +45,10 @@ do_test blob-1.3 {
|
||||
set blob [execsql {SELECT x'abcdEF12';}]
|
||||
bin_to_hex [lindex $blob 0]
|
||||
} {ABCDEF12}
|
||||
do_test blob-1.3.2 {
|
||||
set blob [execsql {SELECT x'0123456789abcdefABCDEF';}]
|
||||
bin_to_hex [lindex $blob 0]
|
||||
} {0123456789ABCDEFABCDEF}
|
||||
|
||||
# Try some syntax errors in blob literals.
|
||||
do_test blob-1.4 {
|
||||
@ -59,6 +63,25 @@ do_test blob-1.6 {
|
||||
do_test blob-1.7 {
|
||||
catchsql {SELECT X'01001'}
|
||||
} {1 {unrecognized token: "X'01001'"}}
|
||||
do_test blob-1.8 {
|
||||
catchsql {SELECT x'012/45'}
|
||||
} {1 {unrecognized token: "x'012/45'"}}
|
||||
do_test blob-1.9 {
|
||||
catchsql {SELECT x'012:45'}
|
||||
} {1 {unrecognized token: "x'012:45'"}}
|
||||
do_test blob-1.10 {
|
||||
catchsql {SELECT x'012@45'}
|
||||
} {1 {unrecognized token: "x'012@45'"}}
|
||||
do_test blob-1.11 {
|
||||
catchsql {SELECT x'012G45'}
|
||||
} {1 {unrecognized token: "x'012G45'"}}
|
||||
do_test blob-1.12 {
|
||||
catchsql {SELECT x'012`45'}
|
||||
} {1 {unrecognized token: "x'012`45'"}}
|
||||
do_test blob-1.13 {
|
||||
catchsql {SELECT x'012g45'}
|
||||
} {1 {unrecognized token: "x'012g45'"}}
|
||||
|
||||
|
||||
# Insert a blob into a table and retrieve it.
|
||||
do_test blob-2.0 {
|
||||
|
Reference in New Issue
Block a user