summaryrefslogtreecommitdiff
path: root/test cases/format/5 transform/options.expected.meson
blob: 756c226f550b5958ddc1c4da146acc1842f3db32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
project('a')   # should be on one line


# List should be removed, and should be on one line
options_ini = 'options.ini'
f = files(options_ini, 'expected.meson', 'source.meson')

# This array should fit on one line
a1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 ]

# This array is too long and should be split
a2 = [ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 ]

# space array
a3 = [ 1, 2, 3 ]

# multi line expression
is_foo = (true and false and true and false and true and false and true and false and true and false)

# no single comma function
fct = files(
  'meson.build'   # force multiline
)

# wide colon
d = {
  'a' : 1,
  'b' : 2,
  'c' : 3,
}

# string conversion
'This is not a multiline'
'This is not a fstring'
'''This isn't convertible'''

# group arg value
arguments = [
  'a',
  '--opt_a', 'opt_a_value',
  'b',
  'c',
  '--opt_d',
  '--opt_e', 'opt_e_value',
  '--opt_f',
  '--opt_g', 'opt_g_value',
  'other_value',
  'again',
  '--x',
]

# issue #15032
if true
  if true
    if (
      true
      and true
      and false
    )
      message('Hello, world!')
    endif
  endif
endif

# issue #15019
if get_option('client')
  sources += files(
    'pypaste/client/__init__.py',
    'pypaste/client/__main__.py',
    'pypaste/client/plugins/__init__.py',
    'pypaste/client/plugins/pgz/__init__.py',
    'pypaste/client/plugins/zen/__init__.py',
  )

  dependencies += [ 'requests' ]
endif

# no final endline