From 649f960f9bf66ea3f49dc2f723ed6d8d51e1963f Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Thu, 28 Mar 2019 15:01:04 +0100 Subject: Unskip downloadUniqueFilenameWithTimestamp auto test Task-number: QTBUG-74764 Change-Id: I0e872449584b37c484e4d5ea46ba0bbc47124f51 Reviewed-by: Allan Sandfeld Jensen --- .../qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp index 8669c8f94..c41315cd7 100644 --- a/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp +++ b/tests/auto/widgets/qwebenginedownloaditem/tst_qwebenginedownloaditem.cpp @@ -73,7 +73,7 @@ private Q_SLOTS: void downloadDeletedByProfile(); void downloadUniqueFilename_data(); void downloadUniqueFilename(); - void downloadUniqueFileNameWithTimeStamp(); + void downloadUniqueFilenameWithTimestamp(); void downloadToDefaultLocation(); void downloadToNonExistentDir(); void downloadToReadOnlyDir(); @@ -917,11 +917,8 @@ void tst_QWebEngineDownloadItem::downloadUniqueFilename() } } -void tst_QWebEngineDownloadItem::downloadUniqueFileNameWithTimeStamp() +void tst_QWebEngineDownloadItem::downloadUniqueFilenameWithTimestamp() { -#ifdef Q_OS_WIN - QSKIP("QTBUG-74764: The download completes after the test fails thus would ruin subsequent tests on Windows."); -#endif // Set up HTTP server QString baseName("test(1.test)"); QString extension("txt"); @@ -988,8 +985,8 @@ void tst_QWebEngineDownloadItem::downloadUniqueFileNameWithTimeStamp() QRegularExpressionMatch match = fileNameCheck.match(downloadedFilePath); QVERIFY(match.hasMatch()); // ISO 8601 Date and time in UTC - QRegExp timeStamp("^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])([.][0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9]):[0-5][0-9])?$"); - QVERIFY(timeStamp.exactMatch(match.captured(1))); + QRegExp timestamp("^(-?(?:[1-9][0-9]*)?[0-9]{4})-(1[0-2]|0[1-9])-(3[01]|0[1-9]|[12][0-9])T(2[0-3]|[01][0-9])([0-5][0-9])([0-5][0-9])([.][0-9]+)?(Z|[+-](?:2[0-3]|[01][0-9])[0-5][0-9])?$"); + QVERIFY(timestamp.exactMatch(match.captured(1))); } } -- cgit v1.2.3