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() |