aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/96 stringdef
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/96 stringdef')
-rw-r--r--meson/test cases/common/96 stringdef/meson.build3
-rw-r--r--meson/test cases/common/96 stringdef/stringdef.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/meson/test cases/common/96 stringdef/meson.build b/meson/test cases/common/96 stringdef/meson.build
new file mode 100644
index 000000000..3f9170e20
--- /dev/null
+++ b/meson/test cases/common/96 stringdef/meson.build
@@ -0,0 +1,3 @@
+project('stringdef', 'c')
+
+test('stringdef', executable('stringdef', 'stringdef.c', c_args : '-DFOO="bar"'))
diff --git a/meson/test cases/common/96 stringdef/stringdef.c b/meson/test cases/common/96 stringdef/stringdef.c
new file mode 100644
index 000000000..17e29fdc1
--- /dev/null
+++ b/meson/test cases/common/96 stringdef/stringdef.c
@@ -0,0 +1,10 @@
+#include<stdio.h>
+#include<string.h>
+
+int main(void) {
+ if(strcmp(FOO, "bar")) {
+ printf("FOO is misquoted: %s\n", FOO);
+ return 1;
+ }
+ return 0;
+}