From 6637c291ae72c03b4f032a72fb2dbdaf30432714 Mon Sep 17 00:00:00 2001 From: Rustam Zaitov Date: Tue, 1 Oct 2013 15:19:01 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=82=D0=B5=D1=81=D1=82=20=D0=BD=D0=B0=20=D0=BF=D0=B0=D1=82?= =?UTF-8?q?=D1=87=20sln=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../remove_project_sections_from_test.py | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 scripts/UnitTests/SolutionToolkit/remove_project_sections_from_test.py diff --git a/scripts/UnitTests/SolutionToolkit/remove_project_sections_from_test.py b/scripts/UnitTests/SolutionToolkit/remove_project_sections_from_test.py new file mode 100644 index 0000000..f0e8bfb --- /dev/null +++ b/scripts/UnitTests/SolutionToolkit/remove_project_sections_from_test.py @@ -0,0 +1,48 @@ +import unittest +import sys +sys.path.append('../../') +import sln_toolkit as sln + +class TestRemoveProjectSections(unittest.TestCase): + + def test_RemoveProjectSections(self): + toolkit = sln.SolutionToolkitBase() + patched_content = toolkit.RemoveProjectSectionsFrom(TestRemoveProjectSections.sln_content_original, ['NotCompileApp']) + self.assertEqual(TestRemoveProjectSections.sln_content_patched, patched_content) + + sln_content_original = r""" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoolApp", "BuildSample\CoolApp.csproj", "{E7393DD4-5E5F-456A-89AB-000EC63BD901}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotCompileApp", "NotCompileApp\NotCompileApp.csproj", "{3DE4FDFA-1502-44CF-9B73-78B6D730C59F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + EndGlobalSection +""" + + sln_content_patched = r""" +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoolApp", "BuildSample\CoolApp.csproj", "{E7393DD4-5E5F-456A-89AB-000EC63BD901}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Domain", "Domain\Domain.csproj", "{BD5EC0A1-EDC9-4D90-BACF-AE54F26148C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|iPhoneSimulator = Debug|iPhoneSimulator + Release|iPhoneSimulator = Release|iPhoneSimulator + Debug|iPhone = Debug|iPhone + Release|iPhone = Release|iPhone + EndGlobalSection +""" + +if __name__ == '__main__': + unittest.main() \ No newline at end of file