Index: test/win/gyptest-link_dep.py |
diff --git a/test/win/gyptest-link_dep.py b/test/win/gyptest-link_dep.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d5c8e529d56236f34194f414fedfeb50c70752cc |
--- /dev/null |
+++ b/test/win/gyptest-link_dep.py |
@@ -0,0 +1,32 @@ |
+#!/usr/bin/env python |
+ |
+# Copyright (c) 2012 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 nxcompat setting is extracted properly. |
+""" |
+ |
+import TestGyp |
+ |
+import subprocess |
+import sys |
+ |
+if sys.platform == 'win32': |
+ test = TestGyp.TestGyp(formats=['ninja']) |
+ |
+ CHDIR = 'linker_flags' |
+ test.run_gyp('dep.gyp', chdir=CHDIR) |
+ |
+ ninja_file = test.built_file_path('obj/test_dep_default.ninja', chdir=CHDIR) |
+ test.must_not_contain(ninja_file, '/NXCOMPAT') |
+ |
+ ninja_file = test.built_file_path('obj/test_dep_no.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/NXCOMPAT:NO') |
+ |
+ ninja_file = test.built_file_path('obj/test_dep_yes.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/NXCOMPAT') |
+ test.must_not_contain(ninja_file, '/NXCOMPAT:NO') |
+ |
+ test.pass_test() |