mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-06-01 10:34:08 +02:00
Update testutility
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
6ab7e814a5
commit
38b89a3fa0
@ -116,11 +116,11 @@ private slots:
|
|||||||
}
|
}
|
||||||
// pass the binary name owncloud to the next call. This brakes branding,
|
// pass the binary name owncloud to the next call. This brakes branding,
|
||||||
// but branding is not supposed to work with this.
|
// but branding is not supposed to work with this.
|
||||||
QString ver = versionOfInstalledBinary(OWNCLOUD_BIN_PATH+QLatin1String("/owncloud"));
|
QString ver = versionOfInstalledBinary(OWNCLOUD_BIN_PATH+QLatin1String("/nextcloud"));
|
||||||
qDebug() << "Version of installed ownCloud Binary: " << ver;
|
qDebug() << "Version of installed Nextcloud: " << ver;
|
||||||
QVERIFY( !ver.isEmpty());
|
QVERIFY( !ver.isEmpty());
|
||||||
|
|
||||||
QRegExp rx( "ownCloud version \\d+\\.\\d+\\.\\d+.*" );
|
QRegExp rx( "Nextcloud version \\d+\\.\\d+\\.\\d+.*" );
|
||||||
QVERIFY( rx.exactMatch(ver));
|
QVERIFY( rx.exactMatch(ver));
|
||||||
} else {
|
} else {
|
||||||
QVERIFY( versionOfInstalledBinary().isEmpty());
|
QVERIFY( versionOfInstalledBinary().isEmpty());
|
||||||
@ -133,13 +133,13 @@ private slots:
|
|||||||
QDateTime d1 = QDateTime::fromString("2015-01-24T09:20:30+01:00", Qt::ISODate);
|
QDateTime d1 = QDateTime::fromString("2015-01-24T09:20:30+01:00", Qt::ISODate);
|
||||||
QDateTime d2 = QDateTime::fromString("2015-01-23T09:20:30+01:00", Qt::ISODate);
|
QDateTime d2 = QDateTime::fromString("2015-01-23T09:20:30+01:00", Qt::ISODate);
|
||||||
QString s = timeAgoInWords(d2, d1);
|
QString s = timeAgoInWords(d2, d1);
|
||||||
QCOMPARE(s, QLatin1String("1 day(s) ago"));
|
QCOMPARE(s, QLatin1String("1 day ago"));
|
||||||
|
|
||||||
// Different timezones
|
// Different timezones
|
||||||
QDateTime earlyTS = QDateTime::fromString("2015-01-24T09:20:30+01:00", Qt::ISODate);
|
QDateTime earlyTS = QDateTime::fromString("2015-01-24T09:20:30+01:00", Qt::ISODate);
|
||||||
QDateTime laterTS = QDateTime::fromString("2015-01-24T09:20:30-01:00", Qt::ISODate);
|
QDateTime laterTS = QDateTime::fromString("2015-01-24T09:20:30-01:00", Qt::ISODate);
|
||||||
s = timeAgoInWords(earlyTS, laterTS);
|
s = timeAgoInWords(earlyTS, laterTS);
|
||||||
QCOMPARE(s, QLatin1String("2 hour(s) ago"));
|
QCOMPARE(s, QLatin1String("2 hours ago"));
|
||||||
|
|
||||||
// 'Now' in whatever timezone
|
// 'Now' in whatever timezone
|
||||||
earlyTS = QDateTime::currentDateTime();
|
earlyTS = QDateTime::currentDateTime();
|
||||||
|
Loading…
Reference in New Issue
Block a user