Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtsushi Eno <atsushieno@gmail.com>2014-01-28 13:15:05 +0400
committerAtsushi Eno <atsushieno@gmail.com>2014-02-20 13:22:22 +0400
commitb3087090a6c76d95525188f625990d0b166e0baa (patch)
tree510a92aa76dde163a721dbbb764ea18312ff39b1 /mcs/class/Microsoft.Build/Test
parent459b986b1c41d43292ca84726633ce5a0eaac26b (diff)
Make sure to override existing ProjectPropertyInstance values when new decl. arrives.
Diffstat (limited to 'mcs/class/Microsoft.Build/Test')
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
index 07eb79a61fc..01ed253cf47 100644
--- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
@@ -125,6 +125,24 @@ namespace MonoTests.Microsoft.Build.Execution
Assert.AreEqual (1, proj.DefaultTargets.Count, "#1");
Assert.AreEqual ("Build", proj.DefaultTargets [0], "#2");
}
+
+ [Test]
+ public void PropertyOverrides ()
+ {
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <PropertyGroup>
+ <X>x</X>
+ </PropertyGroup>
+ <PropertyGroup>
+ <X>y</X>
+ </PropertyGroup>
+</Project>";
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
+ root.FullPath = "ProjectTest.BuildCSharpTargetBuild.proj";
+ var proj = new ProjectInstance (root);
+ Assert.AreEqual ("y", proj.GetPropertyValue ("X"), "#1");
+ }
}
}