/ Check-in [f362c5d9]
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:Modify the new shell test case to work on non-Windows platforms as well.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | expShell
Files: files | file ages | folders
SHA1: f362c5d9d17a04404a0407a556202d101fde84ee
User & Date: mistachkin 2015-01-18 09:02:57
Context
2015-01-19
07:42
Merge updates from trunk. check-in: c7167f88 user: mistachkin tags: expShell
2015-01-18
09:02
Modify the new shell test case to work on non-Windows platforms as well. check-in: f362c5d9 user: mistachkin tags: expShell
05:35
Some experimental command line shell input/output enhancements. check-in: 25e99f3f user: mistachkin tags: expShell
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/shell1.test.

820
821
822
823
824
825
826
827
828

829
830
831
832
833
834
835
836
837
838
do_test shell1-5.0 {
  #
  # NOTE: Skip NUL byte because it appears to be incompatible with command
  #       shell argument parsing.
  #
  for {set i 1} {$i < 256} {incr i} {
    #
    # NOTE: Due to how the Tcl [exec] command works on Windows (i.e. where
    #       it treats command channels opened for it as textual ones), the

    #       carriage-return and end-of-file characters cannot be used here.
    #
    if {$tcl_platform(platform)=="windows" && ($i == 0x0D || $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]







|
|
>
|

|







820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
do_test shell1-5.0 {
  #
  # NOTE: Skip NUL byte because it appears to be incompatible with command
  #       shell argument parsing.
  #
  for {set i 1} {$i < 256} {incr i} {
    #
    # NOTE: Due to how the Tcl [exec] command works (i.e. where it treats
    #       command channels opened for it as textual ones), the carriage
    #       return character (and on Windows, the end-of-file character)
    #       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]