Initial commit
[yaffs-website] / node_modules / node-gyp / gyp / pylib / gyp / generator / xcode_test.py
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
9 import gyp.generator.xcode as xcode
10 import unittest
11 import sys
12
13
14 class 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
22 if __name__ == '__main__':
23   unittest.main()