Index: test/win/gyptest-cl_rtti.py |
diff --git a/test/win/gyptest-cl_rtti.py b/test/win/gyptest-cl_rtti.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f3fe0ffb2054d59a934009cea6bf94c52fdaac94 |
--- /dev/null |
+++ b/test/win/gyptest-cl_rtti.py |
@@ -0,0 +1,29 @@ |
+#!/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 RTTI 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('rtti.gyp', chdir=CHDIR) |
+ |
+ ninja_file = test.built_file_path('obj/test_rtti_off.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /GR-') |
+ |
+ ninja_file = test.built_file_path('obj/test_rtti_on.ninja', chdir=CHDIR) |
+ test.must_contain(ninja_file, 'cflags = /GR') |
+ test.must_not_contain(ninja_file, '/GR-') |
+ |
+ test.pass_test() |