From df604d105d2cdf28bc9fbd2aa63ed5cef9aaeca2 Mon Sep 17 00:00:00 2001 From: Arttu Tarkiainen Date: Mon, 3 Jan 2022 13:40:37 +0200 Subject: CLI: Add value to 'list' and 'search' command outputs Print both 'TreeName' element and 'moveChildren' attribute value with detailed verbosity mode. Also use QXmlStreamWriter to write the output documents with deterministic attribute order, QDomElement stores the attributes internally in a QMultiHash map, which is randomized. Task-number: QTIFW-2452 Change-Id: I8eec64d39394f4092f8505ec99869165c82d11da Reviewed-by: Katja Marttila --- .../installer/cliinterface/tst_cliinterface.cpp | 32 ++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/auto/installer/cliinterface/tst_cliinterface.cpp b/tests/auto/installer/cliinterface/tst_cliinterface.cpp index e5a819aec..c87e0acc6 100644 --- a/tests/auto/installer/cliinterface/tst_cliinterface.cpp +++ b/tests/auto/installer/cliinterface/tst_cliinterface.cpp @@ -1,6 +1,6 @@ /************************************************************************** ** -** Copyright (C) 2021 The Qt Company Ltd. +** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Installer Framework. @@ -56,32 +56,38 @@ private slots: QLoggingCategory::setFilterRules(loggingRules); auto func = &PackageManagerCore::listAvailablePackages; - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" " \n" " \n" " \n" "\n"), func, QLatin1String("."), QHash()); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" " \n" "\n"), func, QLatin1String("A"), QHash()); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" " \n" "\n"), func, QLatin1String("A.*"), QHash()); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" "\n"), func, QLatin1String("^B"), QHash()); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" "\n"), func, QLatin1String("^B.*"), QHash()); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" "\n"), func, QLatin1String("^C"), QHash()); @@ -90,14 +96,16 @@ private slots: { "Version", "1.0.2" }, { "DisplayName", "A" } }; - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" " \n" "\n"), func, QString(), searchHash); searchHash.clear(); searchHash.insert("Default", "false"); - verifyListPackagesMessage(core.get(), QLatin1String("\n" + verifyListPackagesMessage(core.get(), QLatin1String("\n" + "\n" " \n" "\n"), func, QString(), searchHash); @@ -195,12 +203,14 @@ private slots: core.setValue(scTargetDir, testDirectory); - verifyListPackagesMessage(&core, QLatin1String("\n" + verifyListPackagesMessage(&core, QLatin1String("\n" + "\n" " \n" " \n" "\n"), func, QString()); - verifyListPackagesMessage(&core, QLatin1String("\n" + verifyListPackagesMessage(&core, QLatin1String("\n" + "\n" " \n" "\n"), func, QLatin1String("A")); -- cgit v1.2.3