начал реализовывать возможность патчинга значений в корневом PropertyGroup sln файла
This commit is contained in:
@@ -0,0 +1 @@
|
||||
__author__ = 'rzaitov'
|
||||
@@ -0,0 +1,23 @@
|
||||
import unittest
|
||||
from utils.CsprojPatcher import CsprojPatcher
|
||||
|
||||
|
||||
class TestCsprojPatcher(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.patcher = CsprojPatcher('NotExists.sln')
|
||||
|
||||
def test_CheckPropertyGroupCondition(self):
|
||||
self.checkFit(" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ", 'Debug|iPhoneSimulator')
|
||||
self.checkFit(" '$(Configuration)|$(Platform)'=='Debug|iPhoneSimulator' ", 'Debug|iPhoneSimulator')
|
||||
self.checkFit("'$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator'", 'Debug|iPhoneSimulator')
|
||||
self.checkFit("'$(Configuration)|$(Platform)'=='Debug|iPhoneSimulator'", 'Debug|iPhoneSimulator')
|
||||
|
||||
self.checkFit(" '$(Configuration)' == '' ", '')
|
||||
self.checkFit(" '$(Configuration)'=='' ", '')
|
||||
self.checkFit("'$(Configuration)' == ''", '')
|
||||
self.checkFit("'$(Configuration)'==''", '')
|
||||
|
||||
def checkFit(self, conditionAttrValue, slnConfig):
|
||||
isFit = self.patcher.IsValueFitFor(slnConfig, conditionAttrValue)
|
||||
self.assertTrue(True, isFit)
|
||||
|
||||
Reference in New Issue
Block a user