Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libQuotient for openSUSE:Factory checked in at 2021-10-08 00:06:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libQuotient (Old) and /work/SRC/openSUSE:Factory/.libQuotient.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libQuotient" Fri Oct 8 00:06:11 2021 rev:9 rq:923675 version:0.6.11 Changes: -------- --- /work/SRC/openSUSE:Factory/libQuotient/libQuotient.changes 2021-10-04 18:42:20.114288542 +0200 +++ /work/SRC/openSUSE:Factory/.libQuotient.new.2443/libQuotient.changes 2021-10-08 00:07:07.253862197 +0200 @@ -1,0 +2,11 @@ +Thu Oct 7 08:37:12 UTC 2021 - Dead Mozay <dead_mo...@opensuse.org> + +- Update to version 0.6.11: + * Just after 0.6.10 was out another nasty bug has been discovered, + preventing from proper usage of URLs with an unescaped double-hash (##), + which may come when a matrix.to URL is generated for a bridged IRC channel + (and it even got a very nice number #512). Aside from this fix, + quotest will not return with success code 0 any more if it failed to + even start testing for some reason (#496). + +------------------------------------------------------------------- Old: ---- libQuotient-0.6.10.tar.gz New: ---- libQuotient-0.6.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libQuotient.spec ++++++ --- /var/tmp/diff_new_pack.04bDCY/_old 2021-10-08 00:07:07.661862889 +0200 +++ /var/tmp/diff_new_pack.04bDCY/_new 2021-10-08 00:07:07.661862889 +0200 @@ -20,7 +20,7 @@ %define sonum 0.6 %bcond_with e2ee Name: libQuotient -Version: 0.6.10 +Version: 0.6.11 Release: 0 Summary: Library for Qt Matrix Clients License: LGPL-2.1-only ++++++ libQuotient-0.6.10.tar.gz -> libQuotient-0.6.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libQuotient-0.6.10/CMakeLists.txt new/libQuotient-0.6.11/CMakeLists.txt --- old/libQuotient-0.6.10/CMakeLists.txt 2021-10-03 05:33:07.000000000 +0200 +++ new/libQuotient-0.6.11/CMakeLists.txt 2021-10-06 19:18:45.000000000 +0200 @@ -4,7 +4,7 @@ endif() set(API_VERSION "0.6") -project(Quotient VERSION "${API_VERSION}.10" LANGUAGES CXX) +project(Quotient VERSION "${API_VERSION}.11" LANGUAGES CXX) option(${PROJECT_NAME}_INSTALL_TESTS "install quotest (former qmc-example) application" ON) # https://github.com/quotient-im/libQuotient/issues/369 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libQuotient-0.6.10/lib/util.cpp new/libQuotient-0.6.11/lib/util.cpp --- old/libQuotient-0.6.10/lib/util.cpp 2021-10-03 05:33:07.000000000 +0200 +++ new/libQuotient-0.6.11/lib/util.cpp 2021-10-06 19:18:45.000000000 +0200 @@ -47,7 +47,7 @@ // comma or dot static const QRegularExpression FullUrlRegExp( QStringLiteral( - R"(\b((www\.(?!\.)(?!(\w|\.|-)+@)|(https?|ftp|magnet|matrix):(//)?)(&(?![lg]t;)|[^&\s<>'"])+(&(?![lg]t;)|[^&!,.\s<>'"\]):])))"), + R"(\b((www\.(?!\.)(?!(\w|\.|-)+@)|(https?|ftp):(//)?\w|(magnet|matrix):)(&(?![lg]t;)|[^&\s<>'"])+(&(?![lg]t;)|[^&!,.\s<>'"\]):])))"), RegExpOptions); // email address: // [word chars, dots or dashes]@[word chars, dots or dashes].[word chars] @@ -58,7 +58,7 @@ // https://matrix.org/docs/spec/appendices.html#identifier-grammar static const QRegularExpression MxIdRegExp( QStringLiteral( - R"((^|[^<>/])([!#@][-a-z0-9_=#/.]{1,252}:(?:\w|\.|-)+\.\w+(?::\d{1,5})?))"), + R"((^|[][[:space:](){}`'";])([!#@][-a-z0-9_=#/.]{1,252}:\w(?:\w|\.|-)*\.\w+(?::\d{1,5})?))"), RegExpOptions); Q_ASSERT(FullUrlRegExp.isValid() && EmailAddressRegExp.isValid() && MxIdRegExp.isValid()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libQuotient-0.6.10/tests/quotest.cpp new/libQuotient-0.6.11/tests/quotest.cpp --- old/libQuotient-0.6.10/tests/quotest.cpp 2021-10-03 05:33:07.000000000 +0200 +++ new/libQuotient-0.6.11/tests/quotest.cpp 2021-10-06 19:18:45.000000000 +0200 @@ -102,6 +102,7 @@ TEST_DECL(addAndRemoveTag) TEST_DECL(markDirectChat) TEST_DECL(visitResources) + TEST_DECL(prettyPrintTests) // Add more tests above here public: @@ -134,7 +135,7 @@ // connectUntil() to break the QMetaObject::Connection upon finishing the test // item. #define FINISH_TEST(Condition) \ - return (finishTest(thisTest, Condition, __FILE__, __LINE__), true) + return (finishTest(thisTest, (Condition), __FILE__, __LINE__), true) #define FAIL_TEST() FINISH_TEST(false) @@ -238,7 +239,7 @@ clog << "Sync " << ++i << " complete" << endl; if (auto* r = testSuite->room()) { clog << "Test room timeline size = " << r->timelineSize(); - if (r->pendingEvents().empty()) + if (!r->pendingEvents().empty()) clog << ", pending size = " << r->pendingEvents().size(); clog << endl; } @@ -779,6 +780,52 @@ FINISH_TEST(true); } +bool checkPrettyPrint( + std::initializer_list<std::pair<const char*, const char*>> tests) +{ + bool result = true; + for (const auto& [test, etalon] : tests) { + const auto is = prettyPrint(test).toStdString(); + const auto shouldBe = std::string("<span style='white-space:pre-wrap'>") + + etalon + "</span>"; + if (is == shouldBe) + continue; + clog << is << " != " << shouldBe << endl; + result = false; + } + return result; +} + +TEST_IMPL(prettyPrintTests) +{ + const bool prettyPrintTestResult = checkPrettyPrint( + { { "https://www.matrix.org", + R"(<a href="https://www.matrix.org">https://www.matrix.org</a>)" }, +// { "www.matrix.org", // Doesn't work yet +// R"(<a href="https://www.matrix.org">www.matrix.org</a>)" }, + { "smb://somewhere/file", "smb://somewhere/file" }, // Disallowed scheme + { "https:/something", "https:/something" }, // Malformed URL + { "https://matrix.to/#/!roomid:example.org", + R"(<a href="https://matrix.to/#/!roomid:example.org">https://matrix.to/#/!roomid:example.org</a>)" }, + { "https://matrix.to/#/@user_id:example.org", + R"(<a href="https://matrix.to/#/@user_id:example.org">https://matrix.to/#/@user_id:example.org</a>)" }, + { "https://matrix.to/#/#roomalias:example.org", + R"(<a href="https://matrix.to/#/#roomalias:example.org">https://matrix.to/#/#roomalias:example.org</a>)" }, + { "https://matrix.to/#/##ircroomalias:example.org", + R"(<a href="https://matrix.to/#/##ircroomalias:example.org">https://matrix.to/#/##ircroomalias:example.org</a>)" }, + { "m...@example.org", + R"(<a href="mailto:m...@example.org">m...@example.org</a>)" }, + { "mailto:m...@example.org", + R"(<a href="mailto:m...@example.org">mailto:m...@example.org</a>)" }, + { "!room_id:example.org", + R"(<a href="https://matrix.to/#/!room_id:example.org">!room_id:example.org</a>)" }, + { "@user_id:example.org", + R"(<a href="https://matrix.to/#/@user_id:example.org">@user_id:example.org</a>)" }, + { "#room_alias:example.org", + R"(<a href="https://matrix.to/#/#room_alias:example.org">#room_alias:example.org</a>)" } }); + FINISH_TEST(prettyPrintTestResult); +} + void TestManager::conclude() { // Clean up the room (best effort) @@ -847,10 +894,22 @@ void TestManager::finalize() { + if (!c->isUsable() || !c->isLoggedIn()) { + clog << "No usable connection reached" << endl; + QCoreApplication::exit(-2); + return; // NB: QCoreApplication::exit() does return to the caller + } clog << "Logging out" << endl; c->logout(); - connect(c, &Connection::loggedOut, this, - [this] { QCoreApplication::exit(failed.size() + running.size()); }, + connect( + c, &Connection::loggedOut, this, + [this] { + QCoreApplication::exit(!testSuite ? -3 + : succeeded.empty() && failed.empty() + && running.empty() + ? -4 + : failed.size() + running.size()); + }, Qt::QueuedConnection); }