summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-07-20 13:32:03 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-07-21 02:49:22 +0000
commit54e7255eb18b1247d7cfda2d6bc120dc9c0f119b (patch)
tree2c12183ec8375ac2596fb247b768b1fe65895313
parent6a62e7bb1c3a2d9acb135434c24cd6ee7dc07cb9 (diff)
downloadqtxmlpatterns-54e7255eb18b1247d7cfda2d6bc120dc9c0f119b.tar.gz
Autotest: adapt to qt_error_string() now returning Win32 messages
Instead of Unix "No such file or directory". Change-Id: I84e45059a888497fb55ffffd14d32409773e38fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tests/auto/xmlpatterns/tst_xmlpatterns.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
index 8db61b9..e2f7337 100644
--- a/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
+++ b/tests/auto/xmlpatterns/tst_xmlpatterns.cpp
@@ -33,6 +33,10 @@
#include "../qxmlquery/TestFundament.h"
#include "../network-settings.h"
+#ifdef Q_OS_WIN
+# include <qt_windows.h>
+#endif
+
/*!
\class tst_XmlPatterns
\internal
@@ -1043,6 +1047,12 @@ QString tst_XmlPatterns::filterStderr(const QString &in)
for (const QRegExp& rx : irrelevant)
out = out.remove(rx);
+#ifdef Q_OS_WIN
+ // replace some Win32 error messages by standard Unix ones
+ out.replace(qt_error_string(ERROR_FILE_NOT_FOUND), "No such file or directory");
+ out.replace(qt_error_string(ERROR_PATH_NOT_FOUND), "No such file or directory");
+#endif
+
return out;
}