diff options
author | Atsushi Eno <atsushieno@veritas-vos-liberabit.com> | 2013-12-04 15:07:33 +0400 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2014-01-07 19:09:34 +0400 |
commit | f20299d09a2043664a60542ab63a5ce86303bde5 (patch) | |
tree | 67eafcf53a82993ff579cb74fb514c53a2fff7e7 /mcs/class/Microsoft.Build/Test | |
parent | 6e33f6f7241b307d3627ac83087f747ab8278927 (diff) |
Add test for DefaultTargets handling with imports.
Diffstat (limited to 'mcs/class/Microsoft.Build/Test')
-rw-r--r-- | mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs | 13 |
1 files changed, 13 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 327aa389c40..beae6f647d8 100644 --- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs +++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs @@ -98,6 +98,19 @@ namespace MonoTests.Microsoft.Build.Execution root.FullPath = "ProjectInstanceTest.BuildEmptyProject.5.proj"; Assert.IsTrue (new ProjectInstance (root).Build ((string) null, null), "#5"); } + + [Test] + public void DefaultTargets () + { + string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'> + <Import Project='$(MSBuildToolsPath)\Microsoft.Common.targets' /> +</Project>"; + var xml = XmlReader.Create (new StringReader(project_xml)); + var root = ProjectRootElement.Create (xml); + var proj = new ProjectInstance (root); + Assert.AreEqual (1, proj.DefaultTargets.Count, "#1"); + Assert.AreEqual ("Build", proj.DefaultTargets [0], "#2"); + } } } |