Author: msierad
Date: 2007-01-19 12:59:20 -0500 (Fri, 19 Jan 2007)
New Revision: 71348
Modified:
trunk/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
trunk/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
Log:
2007-01-19 Marek Sieradzki <[EMAIL PROTECTED]>
* Condition.cs: More tests.
Modified: trunk/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
===================================================================
--- trunk/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
2007-01-19 17:28:02 UTC (rev 71347)
+++ trunk/mcs/class/Microsoft.Build.Engine/Test/various/ChangeLog
2007-01-19 17:59:20 UTC (rev 71348)
@@ -1,3 +1,7 @@
+2007-01-19 Marek Sieradzki <[EMAIL PROTECTED]>
+
+ * Condition.cs: More tests.
+
2007-01-12 Marek Sieradzki <[EMAIL PROTECTED]>
* Build.cs: More tests.
Modified: trunk/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
===================================================================
--- trunk/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
2007-01-19 17:28:02 UTC (rev 71347)
+++ trunk/mcs/class/Microsoft.Build.Engine/Test/various/Conditions.cs
2007-01-19 17:59:20 UTC (rev 71348)
@@ -113,7 +113,6 @@
}
[Test]
- [Category ("NotWorking")]
public void TestCondition4 ()
{
Engine engine = new Engine (Consts.BinPath);
@@ -260,6 +259,31 @@
}
[Test]
+ public void TestCondition9 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project
xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <PropertyGroup>
+ <A Condition=""'A' == 'A'""></A>
+ <B Condition="" 'A' == 'A'
""></B>
+ <C Condition=""'A' == 'a'""></C>
+ <D Condition=""'A' == 'b'""></D>
+ </PropertyGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+
+ Assert.IsNotNull (proj.EvaluatedProperties ["A"], "A1");
+ Assert.IsNotNull (proj.EvaluatedProperties ["B"], "A1");
+ Assert.IsNotNull (proj.EvaluatedProperties ["C"], "A1");
+ Assert.IsNull (proj.EvaluatedProperties ["D"], "A1");
+ }
+
+ [Test]
[ExpectedException (typeof (InvalidProjectFileException))]
public void TestIncorrectCondition1 ()
{
@@ -336,5 +360,23 @@
proj.LoadXml (documentString);
}
+
+ [Test]
+ [ExpectedException (typeof (InvalidProjectFileException))]
+ public void TestIncorrectCondition5 ()
+ {
+ Engine engine = new Engine (Consts.BinPath);
+ Project proj = engine.CreateNewProject ();
+
+ string documentString = @"
+ <Project
xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <A Include='a' Condition="" '
== '' "" />
+ </ItemGroup>
+ </Project>
+ ";
+
+ proj.LoadXml (documentString);
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches