Disable failing Mono test

https://github.com/mono/mono/issues/12603
上级 8fda764f
...@@ -64,7 +64,7 @@ public void FileWithErrors() ...@@ -64,7 +64,7 @@ public void FileWithErrors()
} }
} }
[Fact] [ConditionalFact(typeof(ClrOnly), Reason = "https://github.com/mono/mono/issues/12603")]
public void FileThatCannotBeDecoded() public void FileThatCannotBeDecoded()
{ {
var code = "#load \"b.csx\""; var code = "#load \"b.csx\"";
......
...@@ -244,7 +244,7 @@ public void FromSource_Precomputed() ...@@ -244,7 +244,7 @@ public void FromSource_Precomputed()
} }
} }
[Fact] [ConditionalFact(typeof(ClrOnly), Reason = "https://github.com/mono/mono/issues/12603")]
public void FromBytes_EncodingFallbackCase() public void FromBytes_EncodingFallbackCase()
{ {
var source = EncodedStringText.Create(new MemoryStream(new byte[] { 0xA9, 0x0D, 0x0A }), canBeEmbedded: true); var source = EncodedStringText.Create(new MemoryStream(new byte[] { 0xA9, 0x0D, 0x0A }), canBeEmbedded: true);
......
...@@ -369,7 +369,7 @@ internal static DiagnosticInfo ToFileReadDiagnostics(CommonMessageProvider messa ...@@ -369,7 +369,7 @@ internal static DiagnosticInfo ToFileReadDiagnostics(CommonMessageProvider messa
{ {
DiagnosticInfo diagnosticInfo; DiagnosticInfo diagnosticInfo;
if (e is FileNotFoundException || e.GetType().Name == "DirectoryNotFoundException") if (e is FileNotFoundException || e is DirectoryNotFoundException)
{ {
diagnosticInfo = new DiagnosticInfo(messageProvider, messageProvider.ERR_FileNotFound, filePath); diagnosticInfo = new DiagnosticInfo(messageProvider, messageProvider.ERR_FileNotFound, filePath);
} }
......
...@@ -160,7 +160,23 @@ public class HasShiftJisDefaultEncoding : ExecutionCondition ...@@ -160,7 +160,23 @@ public class HasShiftJisDefaultEncoding : ExecutionCondition
public class HasEnglishDefaultEncoding : ExecutionCondition public class HasEnglishDefaultEncoding : ExecutionCondition
{ {
public override bool ShouldSkip => Encoding.GetEncoding(0)?.CodePage != 1252; public override bool ShouldSkip
{
get
{
try
{
return Encoding.GetEncoding(0)?.CodePage != 1252;
}
catch (EntryPointNotFoundException)
{
// Mono is throwing this exception on recent runs. Need to just assume false in this case while the
// bug is tracked down.
// https://github.com/mono/mono/issues/12603
return false;
}
}
}
public override string SkipReason => "OS default codepage is not Windows-1252."; public override string SkipReason => "OS default codepage is not Windows-1252.";
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册