aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/blackbox')
-rw-r--r--tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l4
-rw-r--r--tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs8
-rw-r--r--tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l4
3 files changed, 15 insertions, 1 deletions
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l b/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l
index b29f8798f..5c06e1258 100644
--- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l
+++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/after/numbers.l
@@ -40,6 +40,10 @@
%option noyywrap
%{
+#ifndef CRUCIAL_DEFINE
+# error CRUCIAL_DEFINE is missing!
+#endif
+
/* need this for the call to atof() below */
#include <math.h>
%}
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
index 2c145682a..9fe553cb3 100644
--- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
+++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/genlexer.qbs
@@ -65,7 +65,10 @@ Project {
var headerFileName = options["header-file"];
var result = [{
filePath: "GeneratedFiles/" + sourceFileName,
- fileTags: ["c"]
+ fileTags: ["c"],
+ cpp: {
+ defines: ["CRUCIAL_DEFINE"]
+ }
}];
if (headerFileName) {
result.push({
@@ -95,6 +98,9 @@ Project {
fhdr.write("// a rather empty header file\n");
fhdr.close();
}
+ fsrc.write("\n#ifndef CRUCIAL_DEFINE\n");
+ fsrc.write("# error CRUCIAL_DEFINE is missing!\n");
+ fsrc.write("#endif\n\n");
fsrc.write("int main() { return 0; }\n");
fsrc.close();
};
diff --git a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l
index 19f503562..fbc134ee7 100644
--- a/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l
+++ b/tests/auto/blackbox/testdata/dynamicRuleOutputs/before/numbers.l
@@ -41,6 +41,10 @@
%option outfile="numberscanner.c" header-file="numberscanner.h"
%{
+#ifndef CRUCIAL_DEFINE
+# error CRUCIAL_DEFINE is missing!
+#endif
+
/* need this for the call to atof() below */
#include <math.h>
%}