OLD | NEW |
1 # Copyright (c) 2009 Google Inc. All rights reserved. | 1 # Copyright (c) 2009 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This is a simple test file to make sure that variable substitution | 5 # This is a simple test file to make sure that variable substitution |
6 # happens correctly. Run "run_tests.py" using python to generate the | 6 # happens correctly. Run "run_tests.py" using python to generate the |
7 # output from this gyp file. | 7 # output from this gyp file. |
8 | 8 |
9 { | 9 { |
10 'variables': { | 10 'variables': { |
11 'pi': 'import math; print math.pi', | 11 'pi': 'import math; print(math.pi)', |
12 'third_letters': "<(other_letters)HIJK", | 12 'third_letters': "<(other_letters)HIJK", |
13 'letters_list': 'ABCD', | 13 'letters_list': 'ABCD', |
14 'other_letters': '<(letters_list)EFG', | 14 'other_letters': '<(letters_list)EFG', |
15 'check_included': '<(included_variable)', | 15 'check_included': '<(included_variable)', |
16 'check_lists': [ | 16 'check_lists': [ |
17 '<(included_variable)', | 17 '<(included_variable)', |
18 '<(third_letters)', | 18 '<(third_letters)', |
19 ], | 19 ], |
20 'check_int': 5, | 20 'check_int': 5, |
21 'check_str_int': '6', | 21 'check_str_int': '6', |
(...skipping 12 matching lines...) Expand all Loading... |
34 }, | 34 }, |
35 'includes': [ | 35 'includes': [ |
36 'commands.gypi', | 36 'commands.gypi', |
37 ], | 37 ], |
38 'targets': [ | 38 'targets': [ |
39 { | 39 { |
40 'target_name': 'foo', | 40 'target_name': 'foo', |
41 'type': 'none', | 41 'type': 'none', |
42 'variables': { | 42 'variables': { |
43 'var1': '<!(["python", "-c", "<(pi)"])', | 43 'var1': '<!(["python", "-c", "<(pi)"])', |
44 'var2': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")
', | 44 'var2': '<!(python -c "print(\'<!(python -c "<(pi)") <(letters_list)\')"
)', |
45 'var3': '<!(python -c "print \'<(letters_list)\'")', | 45 'var3': '<!(python -c "print(\'<(letters_list)\')")', |
46 'var4': '<(<!(python -c "print \'letters_list\'"))', | 46 'var4': '<(<!(python -c "print(\'letters_list\')"))', |
47 'var5': 'letters_', | 47 'var5': 'letters_', |
48 'var6': 'list', | 48 'var6': 'list', |
49 'var7': '<(check_int)', | 49 'var7': '<(check_int)', |
50 'var8': '<(check_int)blah', | 50 'var8': '<(check_int)blah', |
51 'var9': '<(check_str_int)', | 51 'var9': '<(check_str_int)', |
52 'var10': '<(check_list_int)', | 52 'var10': '<(check_list_int)', |
53 'var11': ['<@(check_list_int)'], | 53 'var11': ['<@(check_list_int)'], |
54 'var12': '<(not_int_1)', | 54 'var12': '<(not_int_1)', |
55 'var13': '<(not_int_2)', | 55 'var13': '<(not_int_2)', |
56 'var14': '<(not_int_3)', | 56 'var14': '<(not_int_3)', |
57 'var15': '<(not_int_4)', | 57 'var15': '<(not_int_4)', |
58 'var16': '<(not_int_5)', | 58 'var16': '<(not_int_5)', |
59 'var17': '<(negative_int)', | 59 'var17': '<(negative_int)', |
60 'var18': '<(zero_int)', | 60 'var18': '<(zero_int)', |
61 # A second set with different names to make sure they only execute the | 61 # A second set with different names to make sure they only execute the |
62 # commands once. | 62 # commands once. |
63 'var1prime': '<!(["python", "-c", "<(pi)"])', | 63 'var1prime': '<!(["python", "-c", "<(pi)"])', |
64 'var2prime': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list
)\'")', | 64 'var2prime': '<!(python -c "print(\'<!(python -c "<(pi)") <(letters_list
)\')")', |
65 'var3prime': '<!(python -c "print \'<(letters_list)\'")', | 65 'var3prime': '<!(python -c "print(\'<(letters_list)\')")', |
66 'var4prime': '<(<!(python -c "print \'letters_list\'"))', | 66 'var4prime': '<(<!(python -c "print(\'letters_list\')"))', |
67 }, | 67 }, |
68 'actions': [ | 68 'actions': [ |
69 { | 69 { |
70 'action_name': 'test_action', | 70 'action_name': 'test_action', |
71 'variables': { | 71 'variables': { |
72 'var7': '<!(echo <(var5)<(var6))', | 72 'var7': '<!(echo <(var5)<(var6))', |
73 }, | 73 }, |
74 'inputs' : [ | 74 'inputs' : [ |
75 '<(var2)', | 75 '<(var2)', |
76 ], | 76 ], |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 'action': [ | 119 'action': [ |
120 'echo', | 120 'echo', |
121 '<(_inputs)', | 121 '<(_inputs)', |
122 '<(_outputs)', | 122 '<(_outputs)', |
123 ], | 123 ], |
124 }, | 124 }, |
125 ], | 125 ], |
126 }, | 126 }, |
127 ], | 127 ], |
128 } | 128 } |
OLD | NEW |