SQLite

Check-in [11b8a4cba7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem causing some Tcl test cases to fail with errors like "expected: [<multiline-whitespace>], got: []".
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 11b8a4cba747ca214fe3506caa3b711c87be4d55412754e673cc0603afefb086
User & Date: dan 2019-01-14 19:13:30.596
Context
2019-01-14
20:44
Add scalar function "prefix_length()" to ext/misc/prefixes.c. (check-in: 0bf1550507 user: dan tags: trunk)
19:13
Fix a problem causing some Tcl test cases to fail with errors like "expected: [<multiline-whitespace>], got: []". (check-in: 11b8a4cba7 user: dan tags: trunk)
16:16
Add the "prefixes" table-valued function in the ext/misc folder. (check-in: f0fd2163fc user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/tester.tcl.
937
938
939
940
941
942
943






944
945
946
947
948
949
950
  }

  if {[llength $args]==2} {
    foreach {testname sql} $args {}
    set result ""
  } elseif {[llength $args]==3} {
    foreach {testname sql result} $args {}






  } else {
    error [string trim {
      wrong # args: should be "do_execsql_test ?-db DB? testname sql ?result?"
    }]
  }

  fix_testname testname







>
>
>
>
>
>







937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
  }

  if {[llength $args]==2} {
    foreach {testname sql} $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?"
    }]
  }

  fix_testname testname