I have been trying to use Nunit to test a C# console app. As part of my [TestFixtureSetup] I have redirected the console output to a string writer as follows;
// Initialize string builder to replace console
m_testingSB = new StringBuilder();
m_testingConsole = new StringWriter(m_testingSB);
// swap normal output console with testing console - to reuse
// it later
m_normalOutput = System.Console.Out;
When the output is written to the output stream I am not getting the same output I would see in the console. An example of what is being written to the stream is "畓瑢瑯污›ꏂ⸰㔶⠊潎漠晦牥\u2073癡楡慬汢⥥吊瑯污瀠楲散›ꏂ⸰㔶\n"
It therefore looks like there may be a bug in the mono code which is returning different character sets in the output stream. Is there something I'm missing in my code or is there a bug in mono.
MonoMac is the open source bindings to write desktop applications on Mac. This bug is misfiled. I'll move it to the correct location.