summaryrefslogtreecommitdiffstats
path: root/test cases/common/96 stringdef
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test cases/common/96 stringdef/meson.build3
-rw-r--r--test cases/common/96 stringdef/stringdef.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/test cases/common/96 stringdef/meson.build b/test cases/common/96 stringdef/meson.build
new file mode 100644
index 0000000..3f9170e
--- /dev/null
+++ b/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/test cases/common/96 stringdef/stringdef.c b/test cases/common/96 stringdef/stringdef.c
new file mode 100644
index 0000000..17e29fd
--- /dev/null
+++ b/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;
+}