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 SettingItem<Protection>("rename") {{"mode", renameMode}, {"flatten", flatten ? "True" : "False"}},
|
||||
outputHelper,
|
||||
"testtmp_" + Guid.NewGuid(),
|
||||
l => Assert.False(l.StartsWith("[WARN]"), "Logged line may not start with [WARN]\r\n" + l));
|
||||
|
||||
public static IEnumerable<object[]> InheritCustomAttributeData() {
|
||||
|
|
|
@ -30,8 +30,7 @@ namespace DynamicTypeRename.Test {
|
|||
{ "mode", renameMode },
|
||||
{ "flatten", flatten.ToString() }
|
||||
},
|
||||
outputHelper,
|
||||
"testtmp_" + Guid.NewGuid()
|
||||
outputHelper
|
||||
);
|
||||
|
||||
public static IEnumerable<object[]> RenameDynamicTypeData() {
|
||||
|
|
|
@ -10,19 +10,18 @@ using Xunit.Abstractions;
|
|||
namespace Confuser.UnitTest {
|
||||
public static class TestRunner {
|
||||
public static async Task Run(string inputFileName, string[] expectedOutput, SettingItem<Protection> protection,
|
||||
ITestOutputHelper outputHelper,
|
||||
string tempDirectory = "testtmp", Action<string> outputAction = null, SettingItem<Packer> packer = null,
|
||||
ITestOutputHelper outputHelper, Action<string> outputAction = null, SettingItem<Packer> packer = 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);
|
||||
|
||||
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) {
|
||||
|
||||
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]);
|
||||
var entryOutputFileName = Path.Combine(outputDir, inputFileNames[0]);
|
||||
FileUtilities.ClearOutput(entryOutputFileName);
|
||||
|
|
Загрузка…
Ссылка в новой задаче