Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: test/conditions/elseif/gyptest_elseif.py

Issue 601353002: Add support for "else if" in gyp conditions (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/conditions/elseif/gyptest_elseif.py
diff --git a/test/conditions/elseif/gyptest_elseif.py b/test/conditions/elseif/gyptest_elseif.py
new file mode 100644
index 0000000000000000000000000000000000000000..469f8f3e5d0b4e8a0d8323920223abf1a608d7c0
--- /dev/null
+++ b/test/conditions/elseif/gyptest_elseif.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2014 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.
+
+"""
+Verify that "else-if" conditons work.
scottmg 2014/11/14 17:09:44 conditons -> conditions
+"""
+
+import TestGyp
+
+test = TestGyp.TestGyp(formats=['msvs', 'ninja'])
scottmg 2014/11/14 17:09:44 should be all generators
+
+test.run_gyp('elseif.gyp')
+test.build('elseif.gyp', test.ALL)
+test.run_built_executable(
+ 'program', stdout='first_if\n')
+
+test.run_gyp('elseif.gyp', '-Dtest_var=1')
+test.build('elseif.gyp', test.ALL)
+test.run_built_executable(
+ 'program', stdout='first_else_if\n')
+
+test.run_gyp('elseif.gyp', '-Dtest_var=2')
+test.build('elseif.gyp', test.ALL)
+test.run_built_executable(
+ 'program', stdout='second_else_if\n')
+
+test.run_gyp('elseif.gyp', '-Dtest_var=3')
+test.build('elseif.gyp', test.ALL)
+test.run_built_executable(
+ 'program', stdout='third_else_if\n')
+
+test.run_gyp('elseif.gyp', '-Dtest_var=4')
+test.build('elseif.gyp', test.ALL)
+test.run_built_executable(
+ 'program', stdout='last_else\n')
+
+test.pass_test()

Powered by Google App Engine
This is Rietveld 408576698