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.
7 """ Unit tests for the xcode.py file. """
9 import gyp.generator.xcode as xcode
14 class TestEscapeXcodeDefine(unittest.TestCase):
15 if sys.platform == 'darwin':
16 def test_InheritedRemainsUnescaped(self):
17 self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)')
19 def test_Escaping(self):
20 self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\')
22 if __name__ == '__main__':