You've already forked linux-packaging-mono
Imported Upstream version 5.20.0.180
Former-commit-id: ff953ca879339fe1e1211f7220f563e1342e66cb
This commit is contained in:
parent
0e2d47d1c8
commit
0510252385
@@ -31,6 +31,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class BuildItemTest {
|
||||
@@ -919,7 +921,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
public void TestBuildItemTransform ()
|
||||
{
|
||||
string projectText = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName='BatchingTestTask' AssemblyFile='Test\resources\TestTasks.dll' />
|
||||
<UsingTask TaskName='BatchingTestTask' AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"' />
|
||||
|
||||
<ItemGroup>
|
||||
<Foo Include='abc'/>
|
||||
|
||||
@@ -33,6 +33,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class BuildPropertyTest {
|
||||
|
||||
@@ -33,6 +33,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class BuildTaskTest {
|
||||
@@ -321,7 +323,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
|
||||
<UsingTask
|
||||
AssemblyFile='Test\resources\TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='OutputTestTask'
|
||||
/>
|
||||
<Target Name='T'>
|
||||
@@ -356,7 +358,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
|
||||
<UsingTask
|
||||
AssemblyFile='Test\resources\TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='NamespacedOutputTestTask'
|
||||
/>
|
||||
<Target Name='T'>
|
||||
@@ -416,7 +418,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
|
||||
<UsingTask
|
||||
AssemblyFile='Test\resources\TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='OutputTestTask'
|
||||
/>
|
||||
<Target Name='T'>
|
||||
@@ -449,7 +451,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
|
||||
<UsingTask
|
||||
AssemblyFile='Test\resources\TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='OutputTestTask'
|
||||
/>
|
||||
<Target Name='T'>
|
||||
|
||||
@@ -996,6 +996,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
// helper methods for TestGlobalProperties*
|
||||
void WriteGlobalPropertiesProjects (string mainProject, string firstProject, string secondProject)
|
||||
{
|
||||
Directory.CreateDirectory (Path.Combine ("Test", "resources"));
|
||||
using (StreamWriter sw = new StreamWriter (Path.Combine ("Test", Path.Combine ("resources", "main.proj")))) {
|
||||
sw.Write (mainProject);
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class ImportCollectionTest {
|
||||
@@ -60,8 +62,8 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -81,7 +83,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -99,7 +101,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -117,7 +119,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -135,7 +137,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -153,7 +155,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Import.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
using System.IO;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class ImportTest {
|
||||
@@ -63,7 +65,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test\resources\first.proj'/>
|
||||
<Import Project='Test\resources\Import.csproj' Condition='false'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"' Condition='false'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -111,7 +113,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/SelfImport.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/SelfImport.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -128,7 +130,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/RelativeImport1.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/RelativeImport1.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -145,7 +147,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/Items.csproj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Items.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -167,7 +169,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/NonExistantProject.proj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/NonExistantProject.csproj") + @"'/>
|
||||
</Project>";
|
||||
|
||||
engine = new Engine (Consts.BinPath);
|
||||
@@ -181,7 +183,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/NonExistantProject.proj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/NonExistantProject.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -199,7 +201,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<Import Project='Test/resources/NonExistantProject.proj'/>
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/NonExistantProject.csproj") + @"'/>
|
||||
</Project>
|
||||
";
|
||||
|
||||
|
||||
@@ -40,6 +40,8 @@ using System.Text;
|
||||
|
||||
using MBT = MonoTests.Microsoft.Build.Tasks;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
|
||||
class TestLogger : Logger {
|
||||
@@ -155,7 +157,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
<PropertyGroup />
|
||||
<ItemGroup />
|
||||
<Target Name='a' />
|
||||
<Import Project='Test/resources/Import.csproj' />
|
||||
<Import Project='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/Import.csproj") + @"' />
|
||||
</Project>
|
||||
";
|
||||
|
||||
@@ -1055,7 +1057,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
|
||||
string documentString = @"
|
||||
<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
|
||||
<Target Name='T' Inputs='Test\resources\TestTasks.cs' Outputs='Test\resources\TestTasks.dll'>
|
||||
<Target Name='T' Inputs='A.cs' Outputs='A.dll'>
|
||||
<Message Text='text' />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -1306,7 +1308,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
//test for multiple items with same metadata also
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -1346,7 +1348,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
public void TestBatchedMetadataRef2 ()
|
||||
{
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -1400,7 +1402,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
public void TestBatchedMetadataRef3 ()
|
||||
{
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -1436,7 +1438,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
public void TestBatchedMetadataRef4 ()
|
||||
{
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -1465,7 +1467,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
public void TestBatchedMetadataRef5 ()
|
||||
{
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -1500,7 +1502,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[Category ("NotDotNet")]
|
||||
public void TestBatchedMetadataRefInOutput () {
|
||||
string projectString = @"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""BatchingTestTask"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<ItemGroup>
|
||||
<Coll1 Include=""A1""><Name>Abc</Name></Coll1>
|
||||
<Coll1 Include=""A2""><Name>Def</Name></Coll1>
|
||||
@@ -2265,7 +2267,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string expected_output_msg)
|
||||
{
|
||||
string projectString = String.Format (@"<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask TaskName=""{0}"" AssemblyFile=""Test/resources/TestTasks.dll"" />
|
||||
<UsingTask TaskName=""{0}"" AssemblyFile=""" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @""" />
|
||||
<Target Name=""foo"">
|
||||
<{0} Property=""{1}"">
|
||||
<Output TaskParameter=""Output"" ItemName=""OutItem""/>
|
||||
|
||||
@@ -36,6 +36,8 @@ using NUnit.Framework;
|
||||
using System.IO;
|
||||
using System.Xml;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class TargetTest {
|
||||
@@ -1038,7 +1040,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
{
|
||||
engine = new Engine (Consts.BinPath);
|
||||
project = engine.CreateNewProject ();
|
||||
project.Load (Path.Combine ("Test", Path.Combine ("resources", "TestReturns.csproj")));
|
||||
project.Load (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestReturns.csproj"));
|
||||
|
||||
var logger = new TestMessageLogger ();
|
||||
engine.RegisterLogger (logger);
|
||||
|
||||
@@ -32,6 +32,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class UsingTaskCollectionTest {
|
||||
@@ -45,7 +47,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -67,11 +69,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='FalseTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -84,12 +86,12 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
IEnumerator en = project.UsingTasks.GetEnumerator ();
|
||||
en.MoveNext ();
|
||||
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ((UsingTask) en.Current).AssemblyFile, "A1");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ((UsingTask) en.Current).AssemblyFile, "A1");
|
||||
Assert.AreEqual ("TrueTestTask", ((UsingTask) en.Current).TaskName, "A2");
|
||||
|
||||
en.MoveNext ();
|
||||
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ((UsingTask) en.Current).AssemblyFile, "A3");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ((UsingTask) en.Current).AssemblyFile, "A3");
|
||||
Assert.AreEqual ("FalseTestTask", ((UsingTask) en.Current).TaskName, "A4");
|
||||
|
||||
Assert.IsFalse (en.MoveNext ());
|
||||
@@ -102,7 +104,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -123,7 +125,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -145,7 +147,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -167,7 +169,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -187,7 +189,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -207,7 +209,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -230,7 +232,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
</Project>
|
||||
|
||||
@@ -32,6 +32,8 @@ using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
using NUnit.Framework;
|
||||
|
||||
using MonoTests.Helpers;
|
||||
|
||||
namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
[TestFixture]
|
||||
public class UsingTaskTest {
|
||||
@@ -45,7 +47,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='SimpleTask'
|
||||
Condition='true'
|
||||
/>
|
||||
@@ -61,7 +63,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
|
||||
UsingTask ut = (UsingTask) en.Current;
|
||||
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ut.AssemblyFile, "A1");
|
||||
Assert.IsNull (ut.AssemblyName, "A2");
|
||||
Assert.AreEqual ("true", ut.Condition, "A3");
|
||||
Assert.AreEqual (false, ut.IsImported, "A4");
|
||||
@@ -74,7 +76,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='SimpleTask'
|
||||
/>
|
||||
</Project>
|
||||
@@ -89,7 +91,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
|
||||
UsingTask ut = (UsingTask) en.Current;
|
||||
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ut.AssemblyFile, "A1");
|
||||
Assert.IsNull (ut.AssemblyName, "A2");
|
||||
Assert.AreEqual (null, ut.Condition, "A3");
|
||||
Assert.AreEqual (false, ut.IsImported, "A4");
|
||||
@@ -133,7 +135,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
/>
|
||||
</Project>
|
||||
";
|
||||
@@ -208,11 +210,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='TrueTestTask'
|
||||
/>
|
||||
|
||||
@@ -238,7 +240,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
Assert.AreEqual (2, project.UsingTasks.Count, "A0");
|
||||
|
||||
foreach (UsingTask ut in project.UsingTasks) {
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ut.AssemblyFile, "A1");
|
||||
Assert.IsNull (ut.AssemblyName, "A2");
|
||||
Assert.AreEqual (null, ut.Condition, "A3");
|
||||
Assert.AreEqual (false, ut.IsImported, "A4");
|
||||
@@ -301,11 +303,11 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='Another.SameTask'
|
||||
/>
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='Other.SameTask'
|
||||
/>
|
||||
|
||||
@@ -343,7 +345,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
string documentString = @"
|
||||
<Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
|
||||
<UsingTask
|
||||
AssemblyFile='Test/resources/TestTasks.dll'
|
||||
AssemblyFile='" + TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll") + @"'
|
||||
TaskName='Another.SameTask'
|
||||
Condition='false'
|
||||
/>
|
||||
@@ -367,7 +369,7 @@ namespace MonoTests.Microsoft.Build.BuildEngine {
|
||||
|
||||
UsingTask ut = (UsingTask) en.Current;
|
||||
|
||||
Assert.AreEqual ("Test/resources/TestTasks.dll", ut.AssemblyFile, "A1");
|
||||
Assert.AreEqual (TestResourceHelper.GetFullPathOfResource ("Test/resources/TestTasks.dll"), ut.AssemblyFile, "A1");
|
||||
Assert.IsNull (ut.AssemblyName, "A2");
|
||||
Assert.AreEqual ("false", ut.Condition, "A3");
|
||||
Assert.AreEqual (false, ut.IsImported, "A4");
|
||||
|
||||
Reference in New Issue
Block a user