diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2014-01-28 13:15:05 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2014-02-20 13:22:22 +0400 |
commit | b3087090a6c76d95525188f625990d0b166e0baa (patch) | |
tree | 510a92aa76dde163a721dbbb764ea18312ff39b1 /mcs/class/Microsoft.Build/Test | |
parent | 459b986b1c41d43292ca84726633ce5a0eaac26b (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.cs | 18 |
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"); + } } } |