summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools/qmakelib
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:30:57 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-01-08 12:35:24 +0100
commitad16478a76815f8f61d454bf7760aaf9ffbb4b51 (patch)
treeeefdd9219cc9d59b62e042f49fc7555b980cb7a4 /tests/auto/tools/qmakelib
parent80a741f3616290897ba0d9f1cbd3c9c5ee62da37 (diff)
parent09c92863001790a0304a5ef389901ee2b5b6cdc2 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Based on merge done by Liang Qi Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
Diffstat (limited to 'tests/auto/tools/qmakelib')
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp11
-rw-r--r--tests/auto/tools/qmakelib/tst_qmakelib.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index bed4c792a1..beafef5ad2 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2205,9 +2205,10 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
<< ""
<< true;
+ // FIXME: This also tests that 'exe' is accepted, but does not test whether it actually works.
QTest::newRow("write_file(): append")
<< "VAR = 'one more line'\n"
- "write_file(" + wpath + ", VAR, append): OK = 1\n"
+ "write_file(" + wpath + ", VAR, append exe): OK = 1\n"
"OUT = $$cat(" + wpath + ", lines)"
<< "OK = 1\nOUT = 'other content' 'one more line'"
<< ""
@@ -2227,7 +2228,13 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
QTest::newRow("write_file(): bad number of arguments")
<< "write_file(1, 2, 3, 4): OK = 1"
<< "OK = UNDEF"
- << "##:1: write_file(name, [content var, [append]]) requires one to three arguments."
+ << "##:1: write_file(name, [content var, [append] [exe]]) requires one to three arguments."
+ << true;
+
+ QTest::newRow("write_file(): invalid flag")
+ << "write_file(file, VAR, fail): OK = 1"
+ << "OK = UNDEF"
+ << "##:1: write_file(): invalid flag fail."
<< true;
// FIXME: This doesn't test whether it actually works.
diff --git a/tests/auto/tools/qmakelib/tst_qmakelib.h b/tests/auto/tools/qmakelib/tst_qmakelib.h
index c4716ca65e..b043d31e21 100644
--- a/tests/auto/tools/qmakelib/tst_qmakelib.h
+++ b/tests/auto/tools/qmakelib/tst_qmakelib.h
@@ -90,8 +90,8 @@ public:
virtual void message(int type, const QString &msg, const QString &fileName, int lineNo)
{ print(fileName, lineNo, type, msg); }
- virtual void fileMessage(const QString &msg)
- { doPrint(msg); }
+ virtual void fileMessage(int type, const QString &msg)
+ { Q_UNUSED(type) doPrint(msg); }
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
virtual void doneWithEval(ProFile *) {}