aboutsummaryrefslogtreecommitdiff
path: root/test cases/common/100 stringdef
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-08-03 01:37:46 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2019-08-03 02:29:44 +0300
commitf39600647d9fe95c91c80b0cc7e7a8c28524e778 (patch)
tree99f13e04856ec46b064bd0126de1a00b226914f5 /test cases/common/100 stringdef
parent2e6df380f15643630f984311d8ab9ec693aba223 (diff)
downloadmeson-f39600647d9fe95c91c80b0cc7e7a8c28524e778.zip
meson-f39600647d9fe95c91c80b0cc7e7a8c28524e778.tar.gz
meson-f39600647d9fe95c91c80b0cc7e7a8c28524e778.tar.bz2
Condense test directory names.
Diffstat (limited to 'test cases/common/100 stringdef')
-rw-r--r--test cases/common/100 stringdef/meson.build3
-rw-r--r--test cases/common/100 stringdef/stringdef.c10
2 files changed, 13 insertions, 0 deletions
diff --git a/test cases/common/100 stringdef/meson.build b/test cases/common/100 stringdef/meson.build
new file mode 100644
index 0000000..3f9170e
--- /dev/null
+++ b/test cases/common/100 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/100 stringdef/stringdef.c b/test cases/common/100 stringdef/stringdef.c
new file mode 100644
index 0000000..69ea656
--- /dev/null
+++ b/test cases/common/100 stringdef/stringdef.c
@@ -0,0 +1,10 @@
+#include<stdio.h>
+#include<string.h>
+
+int main(int argc, char **argv) {
+ if(strcmp(FOO, "bar")) {
+ printf("FOO is misquoted: %s\n", FOO);
+ return 1;
+ }
+ return 0;
+}