SQLite

Check-in [559835e5]
Login

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

Overview
Comment:Change the "explain_i" tcl test command so that xterm color codes are only added if the output is actually a terminal.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 559835e54e0715f2b4d207d056199a8268af739e
User & Date: dan 2014-03-03 16:48:47
Context
2014-03-03
17:36
Change an OP_SCopy into an OP_Copy in a case where the destination might be used after the source has changed. (check-in: c0fa0c0e user: drh tags: trunk)
16:48
Change the "explain_i" tcl test command so that xterm color codes are only added if the output is actually a terminal. (check-in: 559835e5 user: dan tags: trunk)
14:20
Fix a segfault that can occur following an OOM error. (check-in: 7fdd378d user: dan tags: trunk)
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/tester.tcl.

1058
1059
1060
1061
1062
1063
1064

1065
1066
1067
1068






1069
1070
1071
1072
1073
1074
1075

  # Set up colors for the different opcodes. Scheme is as follows:
  #
  #   Red:   Opcodes that write to a b-tree.
  #   Blue:  Opcodes that reposition or seek a cursor. 
  #   Green: The ResultRow opcode.
  #

  set R "\033\[31;1m"        ;# Red fg
  set G "\033\[32;1m"        ;# Green fg
  set B "\033\[34;1m"        ;# Red fg
  set D "\033\[39;0m"        ;# Default fg






  foreach opcode {
      Seek SeekGe SeekGt SeekLe SeekLt NotFound Last Rewind
      NoConflict Next Prev VNext VPrev VFilter
  } {
    set color($opcode) $B
  }
  foreach opcode {ResultRow} {







>
|
|
|
|
>
>
>
>
>
>







1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082

  # Set up colors for the different opcodes. Scheme is as follows:
  #
  #   Red:   Opcodes that write to a b-tree.
  #   Blue:  Opcodes that reposition or seek a cursor. 
  #   Green: The ResultRow opcode.
  #
  if { [catch {fconfigure stdout -mode}]==0 } {
    set R "\033\[31;1m"        ;# Red fg
    set G "\033\[32;1m"        ;# Green fg
    set B "\033\[34;1m"        ;# Red fg
    set D "\033\[39;0m"        ;# Default fg
  } else {
    set R ""
    set G ""
    set B ""
    set D ""
  }
  foreach opcode {
      Seek SeekGe SeekGt SeekLe SeekLt NotFound Last Rewind
      NoConflict Next Prev VNext VPrev VFilter
  } {
    set color($opcode) $B
  }
  foreach opcode {ResultRow} {