blob: 78376edd9959cb3ecf69e2609b60a0050975e012 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001# Copyright (c) 2009 Google Inc. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
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
7# output from this gyp file.
8
9{
10 'variables': {
11 'pi': 'import math; print math.pi',
12 'third_letters': "<(other_letters)HIJK",
13 'letters_list': 'ABCD',
14 'other_letters': '<(letters_list)EFG',
15 'check_included': '<(included_variable)',
16 'check_lists': [
17 '<(included_variable)',
18 '<(third_letters)',
19 ],
20 'check_int': 5,
21 'check_str_int': '6',
22 'check_list_int': [
23 7,
24 '8',
25 9,
26 ],
27 'not_int_1': ' 10',
28 'not_int_2': '11 ',
29 'not_int_3': '012',
30 'not_int_4': '13.0',
31 'not_int_5': '+14',
32 'negative_int': '-15',
33 'zero_int': '0',
34 },
35 'includes': [
36 'commands.gypi',
37 ],
38 'targets': [
39 {
40 'target_name': 'foo',
41 'type': 'none',
42 'variables': {
43 'var1': '<!(["python", "-c", "<(pi)"])',
44 'var2': '<!(python -c "print \'<!(python -c "<(pi)") <(letters_list)\'")',
45 'var3': '<!(python -c "print \'<(letters_list)\'")',
46 'var4': '<(<!(python -c "print \'letters_list\'"))',
47 'var5': 'letters_',
48 'var6': 'list',
49 'var7': '<(check_int)',
50 'var8': '<(check_int)blah',
51 'var9': '<(check_str_int)',
52 'var10': '<(check_list_int)',
53 'var11': ['<@(check_list_int)'],
54 'var12': '<(not_int_1)',
55 'var13': '<(not_int_2)',
56 'var14': '<(not_int_3)',
57 'var15': '<(not_int_4)',
58 'var16': '<(not_int_5)',
59 'var17': '<(negative_int)',
60 'var18': '<(zero_int)',
61 'var19': ['<!@(python test.py)'],
62 'var20': '<!(python test.py)',
63 'var21': '<(default_str)',
64 'var22': '<(default_empty_str)',
65 'var23': '<(default_int)',
66 'var24': '<(default_empty_files)',
67 'var25': '<(default_int_files)',
68 },
69 'actions': [
70 {
71 'action_name': 'test_action',
72 'variables': {
73 'var7': '<!(echo <(var5)<(var6))',
74 },
75 'inputs' : [
76 '<(var2)',
77 ],
78 'outputs': [
79 '<(var4)',
80 '<(var7)',
81 ],
82 'action': [
83 'echo',
84 '<(_inputs)',
85 '<(_outputs)',
86 ],
87 },
88 ],
89 },
90 ],
91}