/ Check-in [cefd36ff]
Login

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

Overview
Comment:Improve error messages from the 'shell1-5.0' test.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cefd36ff7b7f142bcebdb16b4d24ae274cdf2709
User & Date: mistachkin 2016-04-04 17:59:37
Context
2016-04-04
18:04
Fix documentation typos. Comment changes only. No changes to code. check-in: d5fc2f7f user: drh tags: trunk
17:59
Improve error messages from the 'shell1-5.0' test. check-in: cefd36ff user: mistachkin tags: trunk
17:34
Improved handling of UTF8 by the command-line shell. check-in: 4534ebf1 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to test/shell1.test.

   901    901       set x [catchcmdex test.db ".print $char\n"]
   902    902       set code [lindex $x 0]
   903    903       set res [lindex $x 1]
   904    904       if {$code ne "0"} {
   905    905         error "failed with error: $res"
   906    906       }
   907    907       if {$res ne "$oldChar\n"} {
   908         -      error "failed with byte $hex mismatch"
          908  +      if {[llength $res] > 0} {
          909  +        set got [format %02X [scan $res %c]]
          910  +      } else {
          911  +        set got <empty>
          912  +      }
          913  +      error "failed with byte $hex mismatch, got $got"
   909    914       }
   910    915     }
   911    916   } {}
   912    917   
   913    918   # The string used here is the word "test" in Chinese.
   914    919   # In UTF-8, it is encoded as: \xE6\xB5\x8B\xE8\xAF\x95
   915    920   set test \u6D4B\u8BD5