summaryrefslogtreecommitdiffstats
path: root/tests/auto/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-02-17 20:10:34 +0100
committerLiang Qi <liang.qi@qt.io>2017-02-17 20:10:34 +0100
commitbc4cd465dd5df82e13f3c7709166ee11289d219f (patch)
treed6323aaed6383e589fbefb6057648c22bb187c76 /tests/auto/tools
parent43daefb0962794b2df256cae1098e889b9b36f12 (diff)
parent07745d7bfbf6c8d83e0243150d8ce934675dea87 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: qmake/Makefile.unix Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
Diffstat (limited to 'tests/auto/tools')
-rw-r--r--tests/auto/tools/moc/tst_moc.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp
index ecf6c7e992..e704a6877e 100644
--- a/tests/auto/tools/moc/tst_moc.cpp
+++ b/tests/auto/tools/moc/tst_moc.cpp
@@ -2145,6 +2145,22 @@ void tst_Moc::warnings_data()
<< 0
<< QString()
<< QString("standard input:1: Note: No relevant classes found. No output generated.");
+
+ QTest::newRow("Q_PLUGIN_METADATA: invalid file")
+ << QByteArray("class X { \n Q_PLUGIN_METADATA(FILE \"does.not.exists\") \n };")
+ << QStringList()
+ << 1
+ << QString()
+ << QString("standard input:2: Error: Plugin Metadata file \"does.not.exists\" does not exist. Declaration will be ignored");
+
+#ifdef Q_OS_LINUX // Limit to Linux because the error message is platform-dependent
+ QTest::newRow("Q_PLUGIN_METADATA: unreadable file")
+ << QByteArray("class X { \n Q_PLUGIN_METADATA(FILE \".\") \n };")
+ << QStringList()
+ << 1
+ << QString()
+ << QString("standard input:2: Error: Plugin Metadata file \".\" could not be opened: file to open is a directory");
+#endif
}
void tst_Moc::warnings()