diff --git a/src/tests/modules/punk/ansi/testsuites/ansi/grepstr.test b/src/tests/modules/punk/ansi/testsuites/ansi/grepstr.test index d2593606..d09e3d75 100644 --- a/src/tests/modules/punk/ansi/testsuites/ansi/grepstr.test +++ b/src/tests/modules/punk/ansi/testsuites/ansi/grepstr.test @@ -70,6 +70,15 @@ namespace eval ::testspace { if {$code} { return -options $ropts $r } + if {[string first \x00 $caught] >= 0} { + #stderr backed by a windows console: the pushed transform receives the console + #driver's utf-16le wide-char byte stream rather than encoded bytes (each ascii + #char arrives NUL-interleaved), so content assertions never match - decode. + #(found 2026-07-19 via the sibling helper in punk/args dynamic.test failing in + #console-attached singleproc runs; piped stderr and -jobs children are unaffected) + set enc [expr {"utf-16le" in [encoding names] ? "utf-16le" : "unicode"}] + set caught [encoding convertfrom $enc $caught] + } return $caught } diff --git a/src/tests/modules/punk/args/testsuites/args/dynamic.test b/src/tests/modules/punk/args/testsuites/args/dynamic.test index db073022..940aaa29 100644 --- a/src/tests/modules/punk/args/testsuites/args/dynamic.test +++ b/src/tests/modules/punk/args/testsuites/args/dynamic.test @@ -34,6 +34,15 @@ namespace eval ::testspace { if {$code} { return -options $ropts $r } + if {[string first \x00 $caught] >= 0} { + #stderr backed by a windows console: the pushed transform receives the console + #driver's utf-16le wide-char byte stream rather than encoded bytes (each ascii + #char arrives NUL-interleaved), so content assertions never match - decode. + #(found 2026-07-19: dynamic_bad_tag_warns_once failed ONLY in console-attached + #singleproc runs; piped/file stderr and -jobs child processes deliver plain bytes) + set enc [expr {"utf-16le" in [encoding names] ? "utf-16le" : "unicode"}] + set caught [encoding convertfrom $enc $caught] + } return $caught } diff --git a/src/tests/modules/punk/ns/testsuites/ns/corp.test b/src/tests/modules/punk/ns/testsuites/ns/corp.test index 74681831..4bdd024e 100644 --- a/src/tests/modules/punk/ns/testsuites/ns/corp.test +++ b/src/tests/modules/punk/ns/testsuites/ns/corp.test @@ -198,6 +198,15 @@ namespace eval ::testspace { if {$code} { return -options $ropts $r } + if {[string first \x00 $caught] >= 0} { + #stderr backed by a windows console: the pushed transform receives the console + #driver's utf-16le wide-char byte stream rather than encoded bytes (each ascii + #char arrives NUL-interleaved), so content assertions never match - decode. + #(found 2026-07-19 via the sibling helper in punk/args dynamic.test failing in + #console-attached singleproc runs; piped stderr and -jobs children are unaffected) + set enc [expr {"utf-16le" in [encoding names] ? "utf-16le" : "unicode"}] + set caught [encoding convertfrom $enc $caught] + } return $caught } #sp n - n plain spaces (keeps expected values reviewable)