From a8eecb77ea3321fa98563fc7e7c39b75fcfc53fb Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 5 Dec 2023 13:09:22 +0000 Subject: Test case for bug --- tests/exec.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/exec.test b/tests/exec.test index 5a640b0..7f40a38 100644 --- a/tests/exec.test +++ b/tests/exec.test @@ -712,6 +712,22 @@ test exec-20.1 {exec .CMD file} -constraints {win} -body { exec [makeFile "echo %1> $log" exec201.CMD] "Testing exec-20.1" viewFile $log } -result "\"Testing exec-20.1\"" + +# Test with encoding mismatches (Bug 0f1ddc0df7fb7) +test exec-21.1 {exec encoding mismatch} -setup { + set path(script) [makeFile { + fconfigure stdout -translation binary + puts a\xe9b + } script] + set enc [encoding system] + encoding system utf-8 +} -cleanup { + removeFile $path(script) + encoding system $enc +} -body { + exec [info nameofexecutable] $path(script) +} -result a\uFFFDb + # ---------------------------------------------------------------------- # cleanup -- cgit v0.12