summaryrefslogtreecommitdiff
path: root/tools/gyp/pylib/gyp/generator/xcode_test.py
diff options
context:
space:
mode:
authorTimothy J Fontaine <tjfontaine@gmail.com>2013-11-10 15:15:34 -0800
committerTimothy J Fontaine <tjfontaine@gmail.com>2013-11-10 15:15:34 -0800
commit201098535443ef6588b0fd176a425fdf3213ee70 (patch)
tree3259766e34c4a70f087c0ea52c16e0bc74eb11a7 /tools/gyp/pylib/gyp/generator/xcode_test.py
parent3dcc9b93e1e4d80aa15a40a9d82a6b9f0bef0ec0 (diff)
downloadandroid-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.tar.gz
android-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.tar.bz2
android-node-v8-201098535443ef6588b0fd176a425fdf3213ee70.zip
gyp: update to bebdcea
Diffstat (limited to 'tools/gyp/pylib/gyp/generator/xcode_test.py')
-rw-r--r--tools/gyp/pylib/gyp/generator/xcode_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/gyp/pylib/gyp/generator/xcode_test.py b/tools/gyp/pylib/gyp/generator/xcode_test.py
new file mode 100644
index 0000000000..260324a43f
--- /dev/null
+++ b/tools/gyp/pylib/gyp/generator/xcode_test.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+""" Unit tests for the xcode.py file. """
+
+import gyp.generator.xcode as xcode
+import unittest
+import sys
+
+
+class TestEscapeXcodeDefine(unittest.TestCase):
+ if sys.platform == 'darwin':
+ def test_InheritedRemainsUnescaped(self):
+ self.assertEqual(xcode.EscapeXcodeDefine('$(inherited)'), '$(inherited)')
+
+ def test_Escaping(self):
+ self.assertEqual(xcode.EscapeXcodeDefine('a b"c\\'), 'a\\ b\\"c\\\\')
+
+if __name__ == '__main__':
+ unittest.main()