Index: test/win/gyptest-cl_runtime_library.py |
diff --git a/test/win/gyptest-cl_runtime_library.py b/test/win/gyptest-cl_runtime_library.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7a3c02092bb06c666c5f895abe9d8391a7340606 |
--- /dev/null |
+++ b/test/win/gyptest-cl_runtime_library.py |
@@ -0,0 +1,36 @@ |
+#!/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 runtime C library setting is extracted properly. |
+""" |
+ |
+import TestGyp |
+ |
+import subprocess |
+import sys |
+ |
+if sys.platform == 'win32': |
+ test = TestGyp.TestGyp(formats=['ninja']) |
+ |
+ CHDIR = 'compiler_flags' |
+ test.run_gyp('runtime-library.gyp', chdir=CHDIR) |
+ |
+ ninja_file = test.built_file_path('obj/test_rl_md.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /MD') |
+ test.must_not_contain(ninja_file, '/MDd') |
+ |
+ ninja_file = test.built_file_path('obj/test_rl_mdd.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /MDd') |
+ |
+ ninja_file = test.built_file_path('obj/test_rl_mt.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /MT') |
+ test.must_not_contain(ninja_file, '/MTd') |
+ |
+ ninja_file = test.built_file_path('obj/test_rl_mtd.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /MTd') |
+ |
+ test.pass_test() |