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

Fixes for compilation/testing when the various OMIT macros are defined. (CVS 4423)

FossilOrigin-Name: c8405b15c074c94dab5e33272cf1471f458d11df
This commit is contained in:
danielk1977
2007-09-12 17:01:45 +00:00
parent a430ae8e54
commit 4152e677b8
47 changed files with 932 additions and 789 deletions

View File

@ -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.68 2007/09/03 11:04:22 danielk1977 Exp $
# $Id: func.test,v 1.69 2007/09/12 17:01:45 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -324,9 +324,11 @@ do_test func-9.5 {
# generated by randomblob(). So this seems like a good place to test
# hex().
#
do_test func-9.10 {
execsql {SELECT hex(x'00112233445566778899aAbBcCdDeEfF')}
} {00112233445566778899AABBCCDDEEFF}
ifcapable bloblit {
do_test func-9.10 {
execsql {SELECT hex(x'00112233445566778899aAbBcCdDeEfF')}
} {00112233445566778899AABBCCDDEEFF}
}
set encoding [db one {PRAGMA encoding}]
if {$encoding=="UTF-16le"} {
do_test func-9.11-utf16le {
@ -797,15 +799,17 @@ do_test func-21.8 {
}
} {0123456789012345678901234567890123456789012345678901234567890123456789}
do_test func-21.9 {
# Attempt to exploit a buffer-overflow that at one time existed
# in the REPLACE function.
set ::str "[string repeat A 29998]CC[string repeat A 35537]"
set ::rep [string repeat B 65536]
execsql {
SELECT LENGTH(REPLACE($::str, 'C', $::rep));
}
} [expr 29998 + 2*65536 + 35537]
ifcapable tclvar {
do_test func-21.9 {
# Attempt to exploit a buffer-overflow that at one time existed
# in the REPLACE function.
set ::str "[string repeat A 29998]CC[string repeat A 35537]"
set ::rep [string repeat B 65536]
execsql {
SELECT LENGTH(REPLACE($::str, 'C', $::rep));
}
} [expr 29998 + 2*65536 + 35537]
}
# Tests for the TRIM, LTRIM and RTRIM functions.
#