Commit 0bb85719 authored by Adriaan de Groot's avatar Adriaan de Groot 💬 Committed by Albert Astals Cid
Browse files

autotests: repair test of "yesterday" dates

In KCoreAddons dc48123f632781f53dc445d38c005e903b479fa2 the formatting
of relative dates was changed. The KCoreAddons unittests were adapted,
but not the Baloo unittests.

Change the RE to match the newly-introduced " at " string.
parent cb0ab3c7
......@@ -49,12 +49,14 @@ void FileMetadataDateDisplayTest::initTestCase()
static QRegularExpression yesterdayShortRegex()
{
return QRegularExpression(QStringLiteral("Yesterday, (?:[1-2][0-9]|[1-9]):[0-5][0-9] [AP]M"));
// Checking for "yesterday" and a time indication
return QRegularExpression(QStringLiteral("Yesterday at (?:[1-2][0-9]|[1-9]):[0-5][0-9] [AP]M"));
}
static QRegularExpression longAgoShortRegex()
{
return QRegularExpression(QStringLiteral("(?:[1-3][0-9]|[1-9]) (?:[1-2][0-9]|[1-9]):[0-5][0-9] [AP]M"));
// Checking for a 1- or 2-digit day and an hour
return QRegularExpression(QStringLiteral("(?:[1-3][0-9]|[1-9]) at (?:[1-2][0-9]|[1-9]):[0-5][0-9] [AP]M"));
}
void FileMetadataDateDisplayTest::validateDateFormats()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment