From 7fec7395455d2d9a6922571ed615fa5b356c4a17 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 17 Mar 2022 12:00:48 +0000 Subject: Fix 2 testcases which are not testing what they should be testing (since "-encoding ascii" cannot handle the euro-sign \u20ac, it's silently replaced by '?') --- tests/main.test | 2 +- tests/source.test | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/main.test b/tests/main.test index c4bb48d..758a7d0 100644 --- a/tests/main.test +++ b/tests/main.test @@ -155,7 +155,7 @@ namespace eval ::tcl::test::main { puts -nonewline $f {puts [string equal \u20ac } puts $f "\u20ac]" close $f - catch {set f [open "|[list [interpreter] -encoding ascii script]" r]} + catch {set f [open "|[list [interpreter] -encoding iso8859-1 script]" r]} } -body { read $f } -cleanup { diff --git a/tests/source.test b/tests/source.test index 0235bd1..f2a2858 100644 --- a/tests/source.test +++ b/tests/source.test @@ -284,11 +284,11 @@ test source-7.6 {source -encoding: mismatch encoding error} -setup { puts $f "proc \u20ac {} {return foo}" close $f } -body { - source -encoding ascii $sourcefile + source -encoding iso8859-1 $sourcefile \u20ac } -cleanup { removeFile source.file -} -returnCodes error -match glob -result {invalid command name*} +} -returnCodes error -result "invalid command name \"\u20ac\"" test source-8.1 {source and coroutine/yield} -setup { set sourcefile [makeFile {} source.file] -- cgit v0.12