summaryrefslogtreecommitdiffstats
path: root/library/tcltest/tcltest.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-13 22:24:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-13 22:24:05 (GMT)
commit709482b58c79c6e537bd99b134a0cf7e9e41b9b9 (patch)
tree54acbc89aee06b53db205ecf9df09f23b0290768 /library/tcltest/tcltest.tcl
parent3a0bb42e5bfb65b9b23fc56280d89d8d5b00a375 (diff)
downloadtcl-709482b58c79c6e537bd99b134a0cf7e9e41b9b9.zip
tcl-709482b58c79c6e537bd99b134a0cf7e9e41b9b9.tar.gz
tcl-709482b58c79c6e537bd99b134a0cf7e9e41b9b9.tar.bz2
Fix wrongly-placed braces (noted by AKU, thanks!). Also '==' -> 'eq' in expression.
Diffstat (limited to 'library/tcltest/tcltest.tcl')
-rw-r--r--library/tcltest/tcltest.tcl4
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]]