зеркало из https://github.com/nextcloud/desktop.git
gather more information on exceptions that happen when running tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Родитель
bf7f87492a
Коммит
bbc976c920
|
@ -15,6 +15,8 @@
|
|||
#include <QFile>
|
||||
#include <QtTest>
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
using namespace OCC;
|
||||
|
||||
namespace {
|
||||
|
@ -813,6 +815,7 @@ private slots:
|
|||
QVERIFY(fakeFolder.currentLocalState().find("A/t𠜎t"));
|
||||
|
||||
#if !defined(Q_OS_MAC) && !defined(Q_OS_WIN)
|
||||
try {
|
||||
// Try again with a locale that can represent ö but not 𠜎 (4-byte utf8).
|
||||
QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO-8859-15"));
|
||||
QVERIFY(QTextCodec::codecForLocale()->mibEnum() == 111);
|
||||
|
@ -843,6 +846,11 @@ private slots:
|
|||
QVERIFY(fakeFolder.currentRemoteState().find("C/tößt"));
|
||||
|
||||
QTextCodec::setCodecForLocale(utf8Locale);
|
||||
}
|
||||
catch (const std::filesystem::filesystem_error &e)
|
||||
{
|
||||
qCritical() << e.what() << e.path1().c_str() << e.path2().c_str() << e.code().message().c_str();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче