[Pkg-gnupg-commit] [gpgme] 317/412: qt: Fix keyring copy in tests

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Sep 22 21:27:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gpgme.

commit c875f07e559a7c53fc173b4c3f9f5715f3fbb8f8
Author: Andre Heinecke <aheinecke at intevation.de>
Date:   Thu Aug 25 16:23:58 2016 +0200

    qt: Fix keyring copy in tests
    
    * lang/qt/test/t-encrypt.cpp,
    lang/qt/test/t-tofuinfo.cpp: Assert on copy failure.
    * lang/qt/test/t-support.cpp (copyKeyrings): Fix path.
---
 lang/qt/tests/t-encrypt.cpp  | 2 +-
 lang/qt/tests/t-support.cpp  | 2 +-
 lang/qt/tests/t-tofuinfo.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lang/qt/tests/t-encrypt.cpp b/lang/qt/tests/t-encrypt.cpp
index 44cea96..3d4cfa9 100644
--- a/lang/qt/tests/t-encrypt.cpp
+++ b/lang/qt/tests/t-encrypt.cpp
@@ -242,7 +242,7 @@ public Q_SLOT:
         Q_ASSERT(agentConf.open(QIODevice::WriteOnly));
         agentConf.write("allow-loopback-pinentry");
         agentConf.close();
-        copyKeyrings(gpgHome, mDir.path());
+        Q_ASSERT(copyKeyrings(gpgHome, mDir.path()));
     }
 
 private:
diff --git a/lang/qt/tests/t-support.cpp b/lang/qt/tests/t-support.cpp
index 73e8d5c..27c0132 100644
--- a/lang/qt/tests/t-support.cpp
+++ b/lang/qt/tests/t-support.cpp
@@ -50,7 +50,7 @@ bool QGpgMETest::copyKeyrings(const QString &src, const QString &dest)
     bool is21dir = QFileInfo(src + QDir::separator() + QStringLiteral("pubring.kbx")).exists();
     const QString name = is21dir ? QStringLiteral("pubring.kbx") :
                                   QStringLiteral("pubring.gpg");
-    if (!QFile::copy(src + name, dest + QDir::separator() + name)) {
+    if (!QFile::copy(src + QDir::separator() + name, dest + QDir::separator() + name)) {
         return false;
     }
     if (!is21dir) {
diff --git a/lang/qt/tests/t-tofuinfo.cpp b/lang/qt/tests/t-tofuinfo.cpp
index 7eea1ea..d306167 100644
--- a/lang/qt/tests/t-tofuinfo.cpp
+++ b/lang/qt/tests/t-tofuinfo.cpp
@@ -239,7 +239,7 @@ private Q_SLOTS:
         Q_ASSERT(agentConf.open(QIODevice::WriteOnly));
         agentConf.write("allow-loopback-pinentry");
         agentConf.close();
-        copyKeyrings(gpgHome, mDir.path());
+        Q_ASSERT(copyKeyrings(gpgHome, mDir.path()));
     }
 private:
     QTemporaryDir mDir;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git



More information about the Pkg-gnupg-commit mailing list