diff options
author | JinWang An <jinwang.an@samsung.com> | 2023-01-30 13:26:32 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2023-01-30 13:26:32 +0900 |
commit | 7068c0ead0c25a9a1fd3ce0b486636d74350e7ca (patch) | |
tree | 732edf51b955fd198e4bb7ef46a0782fb3ea1d12 /lang/qt/tests/t-config.cpp | |
parent | d19c360948ede5ffe5974de8abc9da44be617ca1 (diff) | |
download | gpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.tar.gz gpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.tar.bz2 gpgme-7068c0ead0c25a9a1fd3ce0b486636d74350e7ca.zip |
Imported Upstream version 1.17.0upstream/1.17.0
Diffstat (limited to 'lang/qt/tests/t-config.cpp')
-rw-r--r-- | lang/qt/tests/t-config.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lang/qt/tests/t-config.cpp b/lang/qt/tests/t-config.cpp index 9ec9566..b84dbfd 100644 --- a/lang/qt/tests/t-config.cpp +++ b/lang/qt/tests/t-config.cpp @@ -57,27 +57,24 @@ private Q_SLOTS: // be unsupported in older versions. return; } - // First set compliance to de-vs auto conf = cryptoConfig(); QVERIFY(conf); - auto entry = conf->entry(QStringLiteral("gpg"), - QStringLiteral("Configuration"), - QStringLiteral("compliance")); + auto entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance")); QVERIFY(entry); + const auto defaultValue = entry->defaultValue().toString(); + QCOMPARE(defaultValue, QStringLiteral("gnupg")); + entry->setStringValue("de-vs"); conf->sync(true); conf->clear(); - entry = conf->entry(QStringLiteral("gpg"), - QStringLiteral("Configuration"), - QStringLiteral("compliance")); + entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance")); QCOMPARE(entry->stringValue(), QStringLiteral("de-vs")); + entry->resetToDefault(); conf->sync(true); conf->clear(); - entry = conf->entry(QStringLiteral("gpg"), - QStringLiteral("Configuration"), - QStringLiteral("compliance")); - QCOMPARE(entry->stringValue(), QStringLiteral("gnupg")); + entry = conf->entry(QStringLiteral("gpg"), QStringLiteral("compliance")); + QCOMPARE(entry->stringValue(), defaultValue); } void initTestCase() |