diff options
Diffstat (limited to 'tests/testing.tcl')
-rw-r--r-- | tests/testing.tcl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/testing.tcl b/tests/testing.tcl index 1fde188..33e3a7e 100644 --- a/tests/testing.tcl +++ b/tests/testing.tcl @@ -29,6 +29,14 @@ proc package-or-skip {name} { } } +set test(utf8) 0 +if {[string length "\xc2\xb5"] == 1} { + set test(utf8) 1 +} +proc bytestring {x} { + return $x +} + catch { # Tcl-only things info tclversion @@ -39,6 +47,16 @@ catch { } proc script_source {script} { } + set test(utf8) 1 + rename bytestring "" + package require tcltest + interp alias {} bytestring {} ::tcltest::bytestring +} + +proc ifutf8 {code} { + if {$::test(utf8)} { + uplevel 1 $code + } } proc section {name} { |