Debian Codegraph @

test cases/common/27 multiline string/meson.build

raw
1 project('multiline string', 'c')
2
3 x = '''hello again'''
4 y = '''hello
5 again'''
6
7 if x == y
8 error('Things are wrong.')
9 endif
10
11 multieol = '''
12 '''
13 singleeol = '\n'
14
15 if multieol != singleeol
16 error('Newline quoting is broken.')
17 endif
18
19 # And one more for good measure.
20 quote1 = ''' ' '''.strip()
21 quote2 = '\''
22
23 if quote1 != quote2
24 error('Single quote quoting is broken.')
25 endif
26
27 cc = meson.get_compiler('c')
28 prog = '''
29 #include <stdio.h>
30
31 int main(void) {
32 int num = 1;
33 printf("%d\n", num);
34 return 0;
35 }'''
36
37 assert(cc.compiles(prog), 'multiline test compile failed')