Index: test/win/gyptest-link_opt_ref.py |
diff --git a/test/win/gyptest-link_opt_ref.py b/test/win/gyptest-link_opt_ref.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..582d10bf2a4c356c974448ab399a4f1b84e2ba50 |
--- /dev/null |
+++ b/test/win/gyptest-link_opt_ref.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 reference optimization 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('opt-ref.gyp', chdir=CHDIR) |
+ |
+ ninja_file = test.built_file_path('obj/test_optref_default.ninja', |
+ chdir=CHDIR) |
+ test.must_not_contain(ninja_file, '/OPT:') |
+ |
+ ninja_file = test.built_file_path('obj/test_optref_no.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/OPT:NOREF') |
+ |
+ ninja_file = test.built_file_path('obj/test_optref_yes.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, '/OPT:REF') |
+ |
+ test.pass_test() |