diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/27 multiline string | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/27 multiline string')
-rw-r--r-- | meson/test cases/common/27 multiline string/meson.build | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meson/test cases/common/27 multiline string/meson.build b/meson/test cases/common/27 multiline string/meson.build new file mode 100644 index 000000000..a87d29ad9 --- /dev/null +++ b/meson/test cases/common/27 multiline string/meson.build @@ -0,0 +1,37 @@ +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 = ''' +#include <stdio.h> + +int main(void) { + int num = 1; + printf("%d\n", num); + return 0; +}''' + +assert(cc.compiles(prog), 'multline test compile failed') |