diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-13 22:24:05 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-01-13 22:24:05 (GMT) |
| commit | 3827fdbdddb5dfcdf30e19a360e1c97a79b41e7d (patch) | |
| tree | 54acbc89aee06b53db205ecf9df09f23b0290768 | |
| parent | 92335a5b9cd2a06dffb89ea3e9b2a68901f5d57f (diff) | |
| download | tcl-3827fdbdddb5dfcdf30e19a360e1c97a79b41e7d.zip tcl-3827fdbdddb5dfcdf30e19a360e1c97a79b41e7d.tar.gz tcl-3827fdbdddb5dfcdf30e19a360e1c97a79b41e7d.tar.bz2 | |
Fix wrongly places braces (noted by AKU, thannks!). Also '==' -> 'eq' in expression
| -rw-r--r-- | library/tcltest/tcltest.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 55ad481..4c8d8f2 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -1144,7 +1144,7 @@ proc tcltest::SafeFetch {n1 n2 op} { # # Transforms the passed string to contain only printable ascii characters. # Useful for printing to terminals. Non-printables are mapped to -# \x, \u or \U sequences. +# \x, \u or \U sequences, except \n. # # Arguments: # s - string to transform @@ -1158,7 +1158,7 @@ proc tcltest::SafeFetch {n1 n2 op} { proc tcltest::Asciify {s} { set print "" foreach c [split $s ""] { - if {[string is print $c] && (($c <= "\x7E") || ($c == "\n"))} { + if {(($c < "\x7F") && [string is print $c]) || ($c eq "\n")} { append print $c } elseif {$c < "\u0100"} { append print \\x[format %02X [scan $c %c]] |
