summaryrefslogtreecommitdiff
path: root/deps/gyp/test/win/gyptest-macro-targetname.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/gyp/test/win/gyptest-macro-targetname.py')
-rw-r--r--deps/gyp/test/win/gyptest-macro-targetname.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/deps/gyp/test/win/gyptest-macro-targetname.py b/deps/gyp/test/win/gyptest-macro-targetname.py
new file mode 100644
index 0000000000..b1118019a3
--- /dev/null
+++ b/deps/gyp/test/win/gyptest-macro-targetname.py
@@ -0,0 +1,29 @@
+#!/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.
+
+"""
+Make sure macro expansion of $(TargetName) and $(TargetDir) are handled.
+"""
+
+import TestGyp
+
+import sys
+
+if sys.platform == 'win32':
+ test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
+
+ CHDIR = 'vs-macros'
+ test.run_gyp('targetname.gyp', chdir=CHDIR)
+ test.build('targetname.gyp', test.ALL, chdir=CHDIR)
+ test.built_file_must_exist('test_targetname_plus_something1.exe',
+ chdir=CHDIR)
+ test.built_file_must_exist(
+ 'prod_prefixtest_targetname_with_prefix_plus_something2.exe',
+ chdir=CHDIR)
+ test.built_file_must_exist('prod_name_plus_something3.exe', chdir=CHDIR)
+ test.built_file_must_exist('prod_prefixprod_name_plus_something4.exe',
+ chdir=CHDIR)
+ test.pass_test()