The Meson Build System
http://mesonbuild.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
568 B
38 lines
568 B
5 years ago
|
project('multiline string', 'c')
|
||
|
|
||
|
x = '''hello again'''
|
||
|
y = '''hello
|
||
|
again'''
|
||
|
|
||
|
if x == y
|
||
|
error('Things are wrong.')
|
||
|
endif
|
||
|
|
||
|
multieol = '''
|
||
|
'''
|
||
|
singleeol = '\n'
|
||
|
|
||
|
if multieol != singleeol
|
||
|
error('Newline quoting is broken.')
|
||
|
endif
|
||
|
|
||
|
# And one more for good measure.
|
||
|
quote1 = ''' ' '''.strip()
|
||
|
quote2 = '\''
|
||
|
|
||
|
if quote1 != quote2
|
||
|
error('Single quote quoting is broken.')
|
||
|
endif
|
||
|
|
||
|
cc = meson.get_compiler('c')
|
||
|
prog = '''
|
||
4 years ago
|
#include <stdio.h>
|
||
|
|
||
5 years ago
|
int main(void) {
|
||
|
int num = 1;
|
||
|
printf("%d\n", num);
|
||
|
return 0;
|
||
|
}'''
|
||
|
|
||
|
assert(cc.compiles(prog), 'multline test compile failed')
|