1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Handle empty blob constants correctly. Ticket #1373. (CVS 2615)

FossilOrigin-Name: 5cada745ac9bf18a65d21705a398b2bb8bd1aaa2
This commit is contained in:
drh
2005-08-23 11:17:58 +00:00
parent 75757853a0
commit 6c8c6cec1f
4 changed files with 23 additions and 15 deletions

View File

@ -10,7 +10,7 @@
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: blob.test,v 1.3 2004/11/03 13:59:06 drh Exp $
# $Id: blob.test,v 1.4 2005/08/23 11:17:59 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -30,19 +30,19 @@ proc bin_to_hex {blob} {
# Simplest possible case. Specify a blob literal
do_test blob-1.0 {
set blob [execsql {SELECT X'01020304'}]
set blob [execsql {SELECT X'01020304';}]
bin_to_hex [lindex $blob 0]
} {01020304}
do_test blob-1.1 {
set blob [execsql {SELECT x'ABCDEF'}]
set blob [execsql {SELECT x'ABCDEF';}]
bin_to_hex [lindex $blob 0]
} {ABCDEF}
do_test blob-1.2 {
set blob [execsql {SELECT x''}]
set blob [execsql {SELECT x'';}]
bin_to_hex [lindex $blob 0]
} {}
do_test blob-1.3 {
set blob [execsql {SELECT x'abcdEF12'}]
set blob [execsql {SELECT x'abcdEF12';}]
bin_to_hex [lindex $blob 0]
} {ABCDEF12}