parent
83c3c74510
commit
2607510b18
6 changed files with 29 additions and 1 deletions
@ -0,0 +1,7 @@ |
||||
## Introducing format strings to the Meson language |
||||
|
||||
In addition to the conventional `'A string @0@ to be formatted @1@'.format(n, m)` |
||||
method of formatting strings in the Meson DSL, there's now the additional |
||||
`f'A string @n@ to be formatted @m@'` notation that provides a non-positional |
||||
and clearer alternative. Meson's format strings are currently restricted to |
||||
identity-expressions, meaning `f'format {'m' + 'e'}'` will not parse. |
@ -0,0 +1,4 @@ |
||||
project('invalid-fstring', 'c') |
||||
|
||||
dict = {'key': true} |
||||
s = f'invalid fstring: @dict@' |
@ -0,0 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/113 invalid fstring/meson.build:4:0: ERROR: Identifier \"dict\" does not name a formattable variable." |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,3 @@ |
||||
project('invalid-fstring', 'c') |
||||
|
||||
z = f'invalid fstring: @foo@' |
@ -0,0 +1,7 @@ |
||||
{ |
||||
"stdout": [ |
||||
{ |
||||
"line": "test cases/failing/114 invalid fstring/meson.build:3:0: ERROR: Identifier \"foo\" does not name a variable." |
||||
} |
||||
] |
||||
} |
Loading…
Reference in new issue