public void WinMDModule() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; CommandLine.ValidateContains(t, "Foo.dll", false); }
public void WinMDModule() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; CommandLine.ValidateContains(t, "Foo.dll", useResponseFile: true); }
public void NoOutputFileDefined() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; t.OutputWindowsMetadataFile = "Foo.winmd"; CommandLine.ValidateHasParameter(t, "/out:Foo.winmd", false); }
public void TestNoWarnSwitchWithWarnings() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; t.DisabledWarnings = "41999,42016"; CommandLine.ValidateHasParameter(t, "/nowarn:41999,42016", false); }
public void UsesrDefinedOutputFile() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; t.OutputWindowsMetadataFile = "Bob.winmd"; CommandLine.ValidateHasParameter(t, "/out:Bob.winmd", useResponseFile: true); }
public void DocumentationFile() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; t.OutputDocumentationFile = "output.xml"; t.InputDocumentationFile = "input.xml"; CommandLine.ValidateHasParameter(t, "/d:output.xml", false); CommandLine.ValidateHasParameter(t, "/md:input.xml", false); }
public void PDBFileTesting() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; t.OutputWindowsMetadataFile = "Foo.dll"; t.OutputPDBFile = "output.pdb"; t.InputPDBFile = "input.pdb"; CommandLine.ValidateHasParameter(t, "/pdb:output.pdb", false); CommandLine.ValidateHasParameter(t, "/mp:input.pdb", false); }
public void References() { WinMDExp t = new WinMDExp(); t.WinMDModule = "Foo.dll"; TaskItem mscorlibReference = new TaskItem("mscorlib.dll"); TaskItem windowsFoundationReference = new TaskItem("Windows.Foundation.winmd"); t.References = new TaskItem[] { mscorlibReference, windowsFoundationReference }; CommandLine.ValidateHasParameter(t, "/reference:mscorlib.dll", false); CommandLine.ValidateHasParameter(t, "/reference:Windows.Foundation.winmd", false); }
public void ArgumentsAreUnquoted() { WinMDExp t = new WinMDExp { AssemblyUnificationPolicy = "sp ace", InputDocumentationFile = "sp ace", InputPDBFile = "sp ace", References = new ITaskItem[] { new TaskItem(@"sp ace"), }, OutputDocumentationFile = "sp ace", OutputPDBFile = "sp ace", OutputWindowsMetadataFile = "sp ace", WinMDModule = "sp ace", }; CommandLineBuilderExtension c = new CommandLineBuilderExtension(quoteHyphensOnCommandLine: false, useNewLineSeparator: true); t.AddResponseFileCommands(c); string[] actual = c.ToString().Split(MSBuildConstants.EnvironmentNewLine, StringSplitOptions.None); string[] expected = { "/d:sp ace", "/md:sp ace", "/mp:sp ace", "/pdb:sp ace", "/assemblyunificationpolicy:sp ace", "/out:sp ace", "/reference:sp ace", "sp ace", }; Assert.Equal(expected, actual); }