1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

Update the SUBSTR function so that works consistently when the

2nd parameter is 0.  Ticket #3628. (CVS 6230)

FossilOrigin-Name: 5fc125d362df4b8525c7e1ab34a14f505756af24
This commit is contained in:
drh
2009-02-02 16:32:55 +00:00
parent 9373b01882
commit 65595cd60b
4 changed files with 26 additions and 18 deletions

View File

@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this file is testing the built-in SUBSTR() functions.
#
# $Id: substr.test,v 1.5 2009/02/01 19:42:38 drh Exp $
# $Id: substr.test,v 1.6 2009/02/02 16:32:55 drh Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -66,7 +66,7 @@ substr-test 1.1 abcdefg 1 1 a
substr-test 1.2 abcdefg 2 1 b
substr-test 1.3 abcdefg 1 2 ab
substr-test 1.4 abcdefg 1 100 abcdefg
substr-test 1.5 abcdefg 0 1 a
substr-test 1.5 abcdefg 0 2 a
substr-test 1.6 abcdefg -1 1 g
substr-test 1.7 abcdefg -1 10 g
substr-test 1.8 abcdefg -5 3 cde
@ -112,7 +112,7 @@ subblob-test 3.1 61626364656667 1 1 61
subblob-test 3.2 61626364656667 2 1 62
subblob-test 3.3 61626364656667 1 2 6162
subblob-test 3.4 61626364656667 1 100 61626364656667
subblob-test 3.5 61626364656667 0 1 61
subblob-test 3.5 61626364656667 0 2 61
subblob-test 3.6 61626364656667 -1 1 67
subblob-test 3.7 61626364656667 -1 10 67
subblob-test 3.8 61626364656667 -5 3 636465