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

Fix a problem causing some Tcl test cases to fail with errors like "expected: [<multiline-whitespace>], got: []".

FossilOrigin-Name: 11b8a4cba747ca214fe3506caa3b711c87be4d55412754e673cc0603afefb086
This commit is contained in:
dan
2019-01-14 19:13:30 +00:00
parent 4ead96348e
commit 9274ad898f
3 changed files with 14 additions and 8 deletions

View File

@ -941,6 +941,12 @@ proc do_execsql_test {args} {
set result ""
} elseif {[llength $args]==3} {
foreach {testname sql result} $args {}
# With some versions of Tcl on windows, if $result is all whitespace but
# contains some CR/LF characters, the [list {*}$result] below returns a
# copy of $result instead of a zero length string. Not clear exactly why
# this is. The following is a workaround.
if {[llength $result]==0} { set result "" }
} else {
error [string trim {
wrong # args: should be "do_execsql_test ?-db DB? testname sql ?result?"