From 709482b58c79c6e537bd99b134a0cf7e9e41b9b9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 13 Jan 2024 22:24:05 +0000 Subject: Fix wrongly-placed braces (noted by AKU, thanks!). Also '==' -> 'eq' in expression. --- library/tcltest/tcltest.tcl | 4 ++-- 1 file 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]] -- cgit v0.12