Use "obfuscated_" + Guid.NewGuid().ToString() everywhere in tests
This commit is contained in:
Родитель
e987ad1951
Коммит
5d9432a84f
|
@ -24,7 +24,6 @@ namespace _123_InheritCustomAttr.Test {
|
||||||
new[] {"Monday", "43", "1"},
|
new[] {"Monday", "43", "1"},
|
||||||
new SettingItem<Protection>("rename") {{"mode", renameMode}, {"flatten", flatten ? "True" : "False"}},
|
new SettingItem<Protection>("rename") {{"mode", renameMode}, {"flatten", flatten ? "True" : "False"}},
|
||||||
outputHelper,
|
outputHelper,
|
||||||
"testtmp_" + Guid.NewGuid(),
|
|
||||||
l => Assert.False(l.StartsWith("[WARN]"), "Logged line may not start with [WARN]\r\n" + l));
|
l => Assert.False(l.StartsWith("[WARN]"), "Logged line may not start with [WARN]\r\n" + l));
|
||||||
|
|
||||||
public static IEnumerable<object[]> InheritCustomAttributeData() {
|
public static IEnumerable<object[]> InheritCustomAttributeData() {
|
||||||
|
|
|
@ -30,8 +30,7 @@ namespace DynamicTypeRename.Test {
|
||||||
{ "mode", renameMode },
|
{ "mode", renameMode },
|
||||||
{ "flatten", flatten.ToString() }
|
{ "flatten", flatten.ToString() }
|
||||||
},
|
},
|
||||||
outputHelper,
|
outputHelper
|
||||||
"testtmp_" + Guid.NewGuid()
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static IEnumerable<object[]> RenameDynamicTypeData() {
|
public static IEnumerable<object[]> RenameDynamicTypeData() {
|
||||||
|
|
|
@ -10,19 +10,18 @@ using Xunit.Abstractions;
|
||||||
namespace Confuser.UnitTest {
|
namespace Confuser.UnitTest {
|
||||||
public static class TestRunner {
|
public static class TestRunner {
|
||||||
public static async Task Run(string inputFileName, string[] expectedOutput, SettingItem<Protection> protection,
|
public static async Task Run(string inputFileName, string[] expectedOutput, SettingItem<Protection> protection,
|
||||||
ITestOutputHelper outputHelper,
|
ITestOutputHelper outputHelper, Action<string> outputAction = null, SettingItem<Packer> packer = null,
|
||||||
string tempDirectory = "testtmp", Action<string> outputAction = null, SettingItem<Packer> packer = null,
|
|
||||||
Action<ProjectModule> projectModuleAction = null) =>
|
Action<ProjectModule> projectModuleAction = null) =>
|
||||||
|
|
||||||
await Run(new[] {inputFileName}, expectedOutput, protection, outputHelper, tempDirectory, outputAction, packer,
|
await Run(new[] {inputFileName}, expectedOutput, protection, outputHelper, outputAction, packer,
|
||||||
projectModuleAction);
|
projectModuleAction);
|
||||||
|
|
||||||
public static async Task Run(string[] inputFileNames, string[] expectedOutput, SettingItem<Protection> protection, ITestOutputHelper outputHelper,
|
public static async Task Run(string[] inputFileNames, string[] expectedOutput, SettingItem<Protection> protection, ITestOutputHelper outputHelper,
|
||||||
string tempDirectory = "testtmp", Action<string> outputAction = null, SettingItem<Packer> packer = null,
|
Action<string> outputAction = null, SettingItem<Packer> packer = null,
|
||||||
Action<ProjectModule> projectModuleAction = null) {
|
Action<ProjectModule> projectModuleAction = null) {
|
||||||
|
|
||||||
var baseDir = Environment.CurrentDirectory;
|
var baseDir = Environment.CurrentDirectory;
|
||||||
var outputDir = Path.Combine(baseDir, tempDirectory);
|
var outputDir = Path.Combine(baseDir, "obfuscated_" + Guid.NewGuid().ToString());
|
||||||
string entryInputFileName = Path.Combine(baseDir, inputFileNames[0]);
|
string entryInputFileName = Path.Combine(baseDir, inputFileNames[0]);
|
||||||
var entryOutputFileName = Path.Combine(outputDir, inputFileNames[0]);
|
var entryOutputFileName = Path.Combine(outputDir, inputFileNames[0]);
|
||||||
FileUtilities.ClearOutput(entryOutputFileName);
|
FileUtilities.ClearOutput(entryOutputFileName);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче