You've already forked linux-packaging-mono
Imported Upstream version 3.10.0
Former-commit-id: 172c8e3c300b39d5785c7a3e8dfb08ebdbc1a99b
This commit is contained in:
@ -433,6 +433,24 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
Assert.AreEqual (String.Empty, c2.ToString (), "A2");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestReferencesAlias ()
|
||||
{
|
||||
CscExtended csc = new CscExtended ();
|
||||
CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
|
||||
CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();
|
||||
|
||||
TaskItem ti1 = new TaskItem ("A");
|
||||
ti1.SetMetadata ("Aliases", "r1,global,r2");
|
||||
|
||||
csc.References = new ITaskItem[2] { ti1, new TaskItem ("B") };
|
||||
csc.ARFC (c1);
|
||||
csc.ACLC (c2);
|
||||
|
||||
Assert.AreEqual ("/reference:r1=A /reference:A /reference:r2=A /reference:B", c1.ToString (), "A1");
|
||||
Assert.AreEqual (String.Empty, c2.ToString (), "A2");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestResponseFiles ()
|
||||
{
|
||||
|
@ -227,6 +227,52 @@ namespace MonoTests.Microsoft.Build.Tasks {
|
||||
";
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestSystemDll ()
|
||||
{
|
||||
var gacDir = GetGacDir ();
|
||||
|
||||
if (gacDir == null || !System.IO.Directory.Exists (gacDir))
|
||||
Assert.Ignore ("GAC not found.");
|
||||
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<ItemGroup>
|
||||
<Reference Include='System.dll' />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<SearchPaths>
|
||||
{CandidateAssemblyFiles};
|
||||
$(ReferencePath);
|
||||
{HintPathFromItem};
|
||||
{TargetFrameworkDirectory};
|
||||
{AssemblyFolders};
|
||||
{GAC};
|
||||
{RawFileName};
|
||||
$(OutputPath)
|
||||
</SearchPaths>
|
||||
</PropertyGroup>
|
||||
<Target Name='A'>
|
||||
<ResolveAssemblyReference
|
||||
Assemblies='@(Reference)'
|
||||
SearchPaths='$(SearchPaths)'
|
||||
>
|
||||
<Output TaskParameter='ResolvedFiles' ItemName='ResolvedFiles'/>
|
||||
</ResolveAssemblyReference>
|
||||
</Target>
|
||||
</Project>
|
||||
";
|
||||
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.LoadXml (documentString);
|
||||
|
||||
Assert.IsTrue (project.Build ("A"), "A1");
|
||||
big = project.GetEvaluatedItemsByName ("ResolvedFiles");
|
||||
Assert.AreEqual (1, big.Count, "A2");
|
||||
Assert.IsTrue (big [0].Include.EndsWith (".dll"), "A3");
|
||||
}
|
||||
|
||||
string GetGacDir ()
|
||||
{
|
||||
// copied from mcs/tools/gacutil/driver.cs
|
||||
|
Reference in New Issue
Block a user