diff options
author | Alexander Köplinger <alex.koeplinger@outlook.com> | 2015-07-23 12:52:06 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2015-08-01 05:13:07 +0300 |
commit | 9a9e721cd85568cf4a5ae7ac22c7f12fea97be80 (patch) | |
tree | e8a600ea2c7deb27e45aee57895c9f6986a768e3 /mcs/class/Microsoft.Build.Tasks | |
parent | 7d68d78eee9f0f48adee310aa901ff66231d1a42 (diff) |
Revert "[Microsoft.Build.Engine] Fix bug with escaped semicolon and spaces"
This reverts commit 51297ed7ab06480df84520c758639b6cef0790d9.
It caused a regression for escaped quotes (%22) in msbuild properties. See https://github.com/mono/mono/commit/51297ed7ab06480df84520c758639b6cef0790d9#commitcomment-11827605.
Disable test that now fails again after the revert. Add new test that verifies the behavior originally broken by the change.
Diffstat (limited to 'mcs/class/Microsoft.Build.Tasks')
-rw-r--r-- | mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/MessageTest.cs | 4 | ||||
-rwxr-xr-x | mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/WriteLinesToFileTest.cs | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/MessageTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/MessageTest.cs index 1aa785622ba..24b76b6c07c 100644 --- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/MessageTest.cs +++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/MessageTest.cs @@ -79,6 +79,7 @@ namespace MonoTests.Microsoft.Build.Tasks { <Message Text='Text5' Importance='normal'/> <Message Text='Text6' Importance='high'/> <Message Text='Text7' /> + <Message Text='%22abc test%22 123 %22def%22' /> <Message Text='Text8' Importance='weird_importance'/> </Target> </Project> @@ -102,7 +103,8 @@ namespace MonoTests.Microsoft.Build.Tasks { Assert.AreEqual (0, testLogger.CheckAny ("Text5", MessageImportance.Normal), "A5"); Assert.AreEqual (0, testLogger.CheckAny ("Text6", MessageImportance.High), "A6"); Assert.AreEqual (0, testLogger.CheckAny ("Text7", MessageImportance.Normal), "A7"); - Assert.AreEqual (1, testLogger.CheckAny ("Text8", MessageImportance.Normal), "A8"); + Assert.AreEqual (0, testLogger.CheckAny ("\"abc test\" 123 \"def\"", MessageImportance.Normal), "A8"); + Assert.AreEqual (1, testLogger.CheckAny ("Text8", MessageImportance.Normal), "A9"); } } } diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/WriteLinesToFileTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/WriteLinesToFileTest.cs index 4a61015f0be..3342c003e8b 100755 --- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/WriteLinesToFileTest.cs +++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/WriteLinesToFileTest.cs @@ -91,6 +91,7 @@ namespace MonoTests.Microsoft.Build.Tasks { } [Test] + [Category("NotWorking")] // this fails due to an xbuild bug, it works on MS.NET public void TestLineWithEscapedSemicolon () { string[] lines = new string[] { "abc%3Btest%3B%3B", "%3Bdef" }; @@ -101,6 +102,7 @@ namespace MonoTests.Microsoft.Build.Tasks { } [Test] + [Category("NotWorking")] // this fails due to an xbuild bug, it works on MS.NET public void TestLineWithEscapedSpace () { string[] lines = new string[] { " %20%20abc%20test ", " def%20%20" }; @@ -111,6 +113,16 @@ namespace MonoTests.Microsoft.Build.Tasks { } [Test] + public void TestLineWithEscapedQuote () + { + string[] lines = new string[] { "%22abc test%22 123 %22def%22" }; + CreateProjectAndCheck (full_filepath, lines, false, true, delegate () { + CheckFileExists (full_filepath, true); + CheckLines (full_filepath, new string [] {"\"abc test\" 123 \"def\""}); + }); + } + + [Test] public void TestNoOverwrite () { string[] lines = new string[] { "abc", "def" }; |