diff options
Diffstat (limited to 'test/Mono.Linker.Tests.Cases/CommandLine')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs | 22 | ||||
-rw-r--r-- | test/Mono.Linker.Tests.Cases/CommandLine/Dependencies/CustomStepDummy.cs | 14 |
2 files changed, 36 insertions, 0 deletions
diff --git a/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs b/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs new file mode 100644 index 000000000..9dde4df35 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/CommandLine/AddCustomStep.cs @@ -0,0 +1,22 @@ +using Mono.Linker.Tests.Cases.Expectations.Assertions; +using Mono.Linker.Tests.Cases.Expectations.Metadata; + +namespace Mono.Linker.Tests.Cases.CommandLine +{ + +#if !NETCOREAPP + [IgnoreTestCase ("Can be enabled once MonoBuild produces a dll from which we can grab the types in the Mono.Linker namespace.")] +#else + [SetupCompileBefore ("CustomStep.dll", new [] { "Dependencies/CustomStepDummy.cs" }, new [] { "illink.dll" })] +#endif + [SetupLinkerArgument ("--custom-step", "CustomStep.CustomStepDummy,CustomStep.dll")] + [SetupLinkerArgument ("--custom-step", "-CleanStep:CustomStep.CustomStepDummy,CustomStep.dll")] + [SetupLinkerArgument ("--custom-step", "+CleanStep:CustomStep.CustomStepDummy,CustomStep.dll")] + [LogContains ("Custom step added")] + public class AddCustomStep + { + public static void Main () + { + } + } +} diff --git a/test/Mono.Linker.Tests.Cases/CommandLine/Dependencies/CustomStepDummy.cs b/test/Mono.Linker.Tests.Cases/CommandLine/Dependencies/CustomStepDummy.cs new file mode 100644 index 000000000..8713dc2c1 --- /dev/null +++ b/test/Mono.Linker.Tests.Cases/CommandLine/Dependencies/CustomStepDummy.cs @@ -0,0 +1,14 @@ +using System; +using Mono.Linker; +using Mono.Linker.Steps; + +namespace CustomStep +{ + public class CustomStepDummy : IStep + { + public void Process(LinkContext context) + { + context.LogMessage ("Custom step added."); + } + } +} |