/ Check-in [4ec2aead]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add comments and improve the new test case.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | expShell
Files: files | file ages | folders
SHA1: 4ec2aeadf949028956e20b72999e2e9cad451922
User & Date: mistachkin 2015-01-19 21:11:31
Context
2015-01-19
21:27
Improve precision of the new test case by removing a superfluous carriage-return from the shell command input. check-in: 913c41b2 user: mistachkin tags: expShell
21:11
Add comments and improve the new test case. check-in: 4ec2aead user: mistachkin tags: expShell
20:22
Remove a shell function that is now superfluous. check-in: d8564f70 user: mistachkin tags: expShell
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/shell1.test.

830
831
832
833
834
835
836
837







838
839
















840
841
842
843
844
845
846
847
848
849
850
851
852
    #       cannot be used here.
    #
    if {$i==0x0D || ($tcl_platform(platform)=="windows" && $i==0x1A)} {
      continue
    }
    set hex [format %02X $i]
    set char [subst \\x$hex]; set oldChar $char
    set char [string map [list \







        \a \\a \b \\b \t \\t \n \\n \v \\v \f \\f \r \\r \
        " " "\" \"" \" \\\" ' \"'\" \\ \\\\] $char]
















    set x [catchcmdex test.db ".print $char\r\n"]
    set code [lindex $x 0]
    set res [lindex $x 1]
    if {$code ne "0"} {
      error "failed with error: $res"
    }
    if {$res ne "$oldChar\n"} {
      error "failed with byte $hex mismatch"
    }
  }
} {}

finish_test







|
>
>
>
>
>
>
>
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>













830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
    #       cannot be used here.
    #
    if {$i==0x0D || ($tcl_platform(platform)=="windows" && $i==0x1A)} {
      continue
    }
    set hex [format %02X $i]
    set char [subst \\x$hex]; set oldChar $char
    set escapes [list]
    if {$tcl_platform(platform)=="windows"} {
      #
      # NOTE: On Windows, we need to escape all the whitespace characters,
      #       the alarm (\a) character, and those with special meaning to
      #       the SQLite shell itself.
      #
      set escapes [list \
          \a \\a \b \\b \t \\t \n \\n \v \\v \f \\f \r \\r \
          " " "\" \"" \" \\\" ' \"'\" \\ \\\\]
    } else {
      #
      # NOTE: On Unix, we need to escape most of the whitespace characters
      #       and those with special meaning to the SQLite shell itself.
      #       The alarm (\a), backspace (\b), and carriage-return (\r)
      #       characters do not appear to require escaping on Unix.  For
      #       the alarm and backspace characters, this is probably due to
      #       differences in the command shell.  For the carriage-return,
      #       it is probably due to differences in how Tcl handles command
      #       channel end-of-line translations.
      #
      set escapes [list \
          \t \\t \n \\n \v \\v \f \\f \
          " " "\" \"" \" \\\" ' \"'\" \\ \\\\]
    }
    set char [string map $escapes $char]
    set x [catchcmdex test.db ".print $char\r\n"]
    set code [lindex $x 0]
    set res [lindex $x 1]
    if {$code ne "0"} {
      error "failed with error: $res"
    }
    if {$res ne "$oldChar\n"} {
      error "failed with byte $hex mismatch"
    }
  }
} {}

finish_test