~mmach/netext73/meson

« back to all changes in this revision

Viewing changes to test cases/unit/79 user options for subproject/subprojects/sub/meson.build

  • Committer: mmach
  • Date: 2023-03-15 07:28:10 UTC
  • Revision ID: netbit73@gmail.com-20230315072810-rjs3fs158gp6aup7
dla focal

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
project('options', 'c')
 
2
 
 
3
if get_option('testoption') != 'optval'
 
4
  error('Incorrect value to test option')
 
5
endif
 
6
 
 
7
if get_option('other_one') != false
 
8
  error('Incorrect value to boolean option.')
 
9
endif
 
10
 
 
11
if get_option('combo_opt') != 'combo'
 
12
  error('Incorrect value to combo option.')
 
13
endif
 
14
 
 
15
if get_option('array_opt') != ['one', 'two']
 
16
  message(get_option('array_opt'))
 
17
  error('Incorrect value for array option')
 
18
endif
 
19
 
 
20
# If the default changes, update test cases/unit/13 reconfigure
 
21
if get_option('b_lto') != false
 
22
  error('Incorrect value in base option.')
 
23
endif
 
24
 
 
25
if get_option('includedir') != 'include'
 
26
  error('Incorrect value in builtin option.')
 
27
endif
 
28
 
 
29
if get_option('integer_opt') != 3
 
30
  error('Incorrect value in integer option.')
 
31
endif
 
32
 
 
33
if get_option('neg_int_opt') != -3
 
34
  error('Incorrect value in negative integer option.')
 
35
endif
 
36
 
 
37
if get_option('CaseSenSiTivE') != 'Some CAPS'
 
38
  error('Incorrect value in mixed caps option.')
 
39
endif
 
40
 
 
41
if get_option('CASESENSITIVE') != 'ALL CAPS'
 
42
  error('Incorrect value in all caps option.')
 
43
endif
 
44
 
 
45
assert(get_option('wrap_mode') == 'default', 'Wrap mode option is broken.')