nunit3-vs-adapter icon indicating copy to clipboard operation
nunit3-vs-adapter copied to clipboard

Mangled test output regression after problematic fix

Open egraff opened this issue 1 year ago • 10 comments

Present in NUnit3TestAdapter 4.3.0 and newer.

Description

When printing full file paths for a collection of DLLs on Windows, I found that after the string \u has been printed to the test output, subsequent test output would be mangled.

Minimal test case:

TestContext.Out.WriteLine("UMMM {0}", "b\\3597805");
TestContext.Out.WriteLine("C:\\Windows\\System32\\user32.dll");
TestContext.Out.WriteLine("UMMM {0}", "b\\3597805");

Resulting output:

UMMM b\3597805
C:\Windows\System32\user32.dll
UMMM b奸05

Expected output:

UMMM b\3597805
C:\Windows\System32\user32.dll
UMMM b\3597805

Cause

I've found that it's likely caused by this commit: https://github.com/nunit/nunit3-vs-adapter/commit/6a6e422a7b4874a2340e90b41f9e9a12b3d3a450 (https://github.com/nunit/nunit3-vs-adapter/pull/984).

I've not delved into the details of that commit, but it's clear that there is a problem that needs fixing.

egraff avatar Sep 20 '23 11:09 egraff