aboutsummaryrefslogtreecommitdiff
path: root/test cases/unit/88 multiple envvars
diff options
context:
space:
mode:
Diffstat (limited to 'test cases/unit/88 multiple envvars')
-rw-r--r--test cases/unit/88 multiple envvars/meson.build4
-rw-r--r--test cases/unit/88 multiple envvars/prog.c18
-rw-r--r--test cases/unit/88 multiple envvars/prog.cpp18
3 files changed, 40 insertions, 0 deletions
diff --git a/test cases/unit/88 multiple envvars/meson.build b/test cases/unit/88 multiple envvars/meson.build
new file mode 100644
index 0000000..ac57611
--- /dev/null
+++ b/test cases/unit/88 multiple envvars/meson.build
@@ -0,0 +1,4 @@
+project('multienv', 'c', 'cpp')
+
+executable('cexe', 'prog.c')
+executable('cppexe', 'prog.cpp')
diff --git a/test cases/unit/88 multiple envvars/prog.c b/test cases/unit/88 multiple envvars/prog.c
new file mode 100644
index 0000000..38d3c12
--- /dev/null
+++ b/test cases/unit/88 multiple envvars/prog.c
@@ -0,0 +1,18 @@
+#include<stdio.h>
+
+#ifndef CPPFLAG
+#error CPPFLAG not set
+#endif
+
+#ifndef CFLAG
+#error CFLAGS not set
+#endif
+
+#ifdef CXXFLAG
+#error CXXFLAG is set
+#endif
+
+int main(int argc, char **argv) {
+ printf("%d %s\n", argc, argv[0]);
+ return 0;
+}
diff --git a/test cases/unit/88 multiple envvars/prog.cpp b/test cases/unit/88 multiple envvars/prog.cpp
new file mode 100644
index 0000000..61ccf3a
--- /dev/null
+++ b/test cases/unit/88 multiple envvars/prog.cpp
@@ -0,0 +1,18 @@
+#include<cstdio>
+
+#ifndef CPPFLAG
+#error CPPFLAG not set
+#endif
+
+#ifdef CFLAG
+#error CFLAG is set
+#endif
+
+#ifndef CXXFLAG
+#error CXXFLAG not set
+#endif
+
+int main(int argc, char **argv) {
+ printf("%d %s\n", argc, argv[0]);
+ return 0;
+}