1#!/usr/bin/env python 2 3# Copyright (c) 2013 Google Inc. All rights reserved. 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7""" Unit tests for the xcode.py file. """ 8 9import gyp.generator.xcode as xcode 10import unittest 11import sys 12 13 14class TestEscapeXcodeDefine(unittest.TestCase): 15 if sys.platform == 'darwin': 16 def test_InheritedRemainsUnescaped(self): 17 self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)') 18 19 def test_Escaping(self): 20 self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\') 21 22if __name__ == '__main__': 23 unittest.main() 24