|
|
|
@ -176,13 +176,19 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -176,13 +176,19 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var command = Cli.Wrap(ilasmPath) |
|
|
|
|
.WithArguments($"/nologo {otherOptions}/output=\"{outputFile}\" \"{sourceFileName}\"") |
|
|
|
|
.WithArguments($"/quiet {otherOptions}/output=\"{outputFile}\" \"{sourceFileName}\"") |
|
|
|
|
.WithValidation(CommandResultValidation.None); |
|
|
|
|
|
|
|
|
|
var result = await command.ExecuteBufferedAsync().ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
Console.WriteLine("output: " + result.StandardOutput); |
|
|
|
|
Console.WriteLine("errors: " + result.StandardError); |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardOutput)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("output:" + Environment.NewLine + result.StandardOutput); |
|
|
|
|
} |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardError)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError); |
|
|
|
|
} |
|
|
|
|
Assert.AreEqual(0, result.ExitCode, "ilasm failed"); |
|
|
|
|
|
|
|
|
|
return outputFile; |
|
|
|
@ -224,8 +230,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -224,8 +230,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
|
|
|
|
|
var result = await command.ExecuteBufferedAsync().ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
Console.WriteLine("output: " + result.StandardOutput); |
|
|
|
|
Console.WriteLine("errors: " + result.StandardError); |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardOutput)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("output:" + Environment.NewLine + result.StandardOutput); |
|
|
|
|
} |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardError)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError); |
|
|
|
|
} |
|
|
|
|
Assert.AreEqual(0, result.ExitCode, "ildasm failed"); |
|
|
|
|
|
|
|
|
|
// Unlike the .imagebase directive (which is a fixed value when compiling with /deterministic),
|
|
|
|
@ -430,7 +442,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -430,7 +442,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
{ |
|
|
|
|
references = references.Concat(new[] { "-r:\"System.Runtime.CompilerServices.Unsafe.dll\"" }); |
|
|
|
|
} |
|
|
|
|
string otherOptions = $"-noconfig " + |
|
|
|
|
string otherOptions = $"-nologo -noconfig " + |
|
|
|
|
$"-langversion:{languageVersion} " + |
|
|
|
|
$"-unsafe -o{(flags.HasFlag(CompilerOptions.Optimize) ? "+ " : "- ")}"; |
|
|
|
|
|
|
|
|
@ -485,9 +497,15 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -485,9 +497,15 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
Console.WriteLine($"\"{command.TargetFilePath}\" {command.Arguments}"); |
|
|
|
|
|
|
|
|
|
var result = await command.ExecuteBufferedAsync().ConfigureAwait(false); |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardOutput)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("output:" + Environment.NewLine + result.StandardOutput); |
|
|
|
|
} |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardError)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Console.WriteLine("output: " + result.StandardOutput); |
|
|
|
|
Console.WriteLine("errors: " + result.StandardError); |
|
|
|
|
Assert.AreEqual(0, result.ExitCode, "csc failed"); |
|
|
|
|
|
|
|
|
|
return results; |
|
|
|
@ -542,8 +560,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -542,8 +560,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
|
|
|
|
|
var result = await command.ExecuteBufferedAsync().ConfigureAwait(false); |
|
|
|
|
|
|
|
|
|
Console.WriteLine("output: " + result.StandardOutput); |
|
|
|
|
Console.WriteLine("errors: " + result.StandardError); |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardOutput)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("output:" + Environment.NewLine + result.StandardOutput); |
|
|
|
|
} |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardError)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError); |
|
|
|
|
} |
|
|
|
|
Assert.AreEqual(0, result.ExitCode, "mcs failed"); |
|
|
|
|
|
|
|
|
|
return results; |
|
|
|
@ -815,8 +839,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
@@ -815,8 +839,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
|
|
|
|
|
var result = await command.ExecuteBufferedAsync().ConfigureAwait(false); |
|
|
|
|
Assert.AreEqual(0, result.ExitCode, "sn failed"); |
|
|
|
|
|
|
|
|
|
Console.WriteLine("output: " + result.StandardOutput); |
|
|
|
|
Console.WriteLine("errors: " + result.StandardError); |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardOutput)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("output:" + Environment.NewLine + result.StandardOutput); |
|
|
|
|
} |
|
|
|
|
if (!string.IsNullOrWhiteSpace(result.StandardError)) |
|
|
|
|
{ |
|
|
|
|
Console.WriteLine("errors:" + Environment.NewLine + result.StandardError); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static async Task<string> FindMSBuild() |
|
|
|
|