提交 376d8f75 编写于 作者: T Tarek Mahmoud Sayed 提交者: GitHub

Minor fix in Console test (dotnet/corefx#14958)

* Minor fix in Console test

This is a minor fix in the the console encoding test and added a small logging to the check to help telling about the used encoding in the test

* Fix typos


Commit migrated from https://github.com/dotnet/corefx/commit/37b96a721ccc71e3de53bf7fde5a472037a50b17
上级 c2383bdf
......@@ -59,7 +59,7 @@ public void TestEncoding(string inputString)
string inString = new String(Console.InputEncoding.GetChars(inputBytesNoBom));
string outString;
using (MemoryStream ms = new MemoryStream(inputBytes, false))
using (MemoryStream ms = new MemoryStream(inputBytesNoBom, false))
{
using (StreamReader sr = new StreamReader(ms, Console.InputEncoding))
{
......@@ -68,7 +68,7 @@ public void TestEncoding(string inputString)
}
}
Assert.Equal(inString, outString);
Assert.True(inString.Equals(outString), $"Encoding: {Console.InputEncoding}, Codepage: {Console.InputEncoding.CodePage}, Expected: {inString}, Actual: {outString} ");
}
finally
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册