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.

23 lines
443 B

project('string formatting', 'c')
templ = '@0@bar@1@'
if templ.format('foo', 'baz') != 'foobarbaz'
error('Basic string formatting is broken.')
endif
if '@0@'.format(1) != '1'
error('String number formatting is broken.')
endif
if '@0@'.format(true) != 'true'
error('String boolean formatting is broken.')
endif
11 years ago
templ2 = '@0@'
subs2 = '42'
if templ2.format(subs2) != '42'
error('String formatting with variables is broken.')
endif