diff options
author | Saturneric <[email protected]> | 2021-06-09 20:14:21 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-06-09 20:14:21 +0000 |
commit | 587b26019beb51aadb4cd245e622774a90442966 (patch) | |
tree | 82b57edca07eadba820074f923b2f81a9f17f60a /test | |
parent | Do not clear the text when the decryption operation fails. (diff) | |
download | GpgFrontend-587b26019beb51aadb4cd245e622774a90442966.tar.gz GpgFrontend-587b26019beb51aadb4cd245e622774a90442966.zip |
Adjust the project structure.
Write a readme.
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to 'test')
l--------- | test/bin | 1 | ||||
-rwxr-xr-x | test/runtest.sh | 11 | ||||
-rw-r--r-- | test/test.pro | 21 | ||||
-rw-r--r-- | test/testgpgcontext.cpp | 62 | ||||
-rw-r--r-- | test/todo.txt | 4 |
5 files changed, 0 insertions, 99 deletions
diff --git a/test/bin b/test/bin deleted file mode 120000 index 40d9fed4..00000000 --- a/test/bin +++ /dev/null @@ -1 +0,0 @@ -../release/bin/
\ No newline at end of file diff --git a/test/runtest.sh b/test/runtest.sh deleted file mode 100755 index 56a01833..00000000 --- a/test/runtest.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -rm keydb/* -rmdir keydb -mkdir keydb - -#make clean -#qmake -make - -./test diff --git a/test/test.pro b/test/test.pro deleted file mode 100644 index ff2aef3d..00000000 --- a/test/test.pro +++ /dev/null @@ -1,21 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) Sa. Dez 10 12:52:21 2011 -###################################################################### - -CONFIG += qtestlib -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -#DESTDIR = ../release - -# Input -SOURCES += testgpgcontext.cpp \ - ../gpgcontext.cpp \ - ../gpgconstants.cpp -HEADERS += ../gpgcontext.h \ - ../gpgconstants.h - -LIBS += -lgpgme \ - -lgpg-error \ - diff --git a/test/testgpgcontext.cpp b/test/testgpgcontext.cpp deleted file mode 100644 index 4435bff1..00000000 --- a/test/testgpgcontext.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include <QObject> -#include <QtTest/QtTest> -#include <../gpgcontext.h> - -/** -* unit test for gpgcontext, -* have a look at http://doc.qt.nokia.com/latest/qtestlib-tutorial1.html -*/ -class TestGpgContext : public QObject -{ - Q_OBJECT - -public: - TestGpgContext(); - -private: - GpgME::GpgContext* mCtx; - -private slots: - void passwordSize(); - -}; - -TestGpgContext::TestGpgContext() { - mCtx = new GpgME::GpgContext(); -} - -void TestGpgContext::passwordSize() { - - QVERIFY(mCtx->listKeys().size() == 0); - - qDebug() << "import:"; - QFile* file = new QFile("../testdata/seckey-1.asc"); - file->open(QIODevice::ReadOnly); - mCtx->importKey(file->readAll()); - - qDebug() << "list:"; - foreach(GpgKey key, mCtx->listKeys()) { - qDebug() << key.id; - } - - QVERIFY(mCtx->listKeys().size() == 1); - - QString password = "abcabc"; - QString params = "<GnupgKeyParms format=\"internal\">\n" - "Key-Type: DSA\n" - "Key-Length: 1024\n" - "Subkey-Type: ELG-E\n" - "Subkey-Length: 1024\n" - "Name-Real: testa\n" - "Expire-Date: 0\n"; - "Passphrase: " + password + "\n" - "</GnupgKeyParms>"; - - /*qDebug() << "gen:"; - mCtx->generateKey(¶ms); - QVERIFY(mCtx->listKeys().size() == 1); - qDebug() << "done.";*/ -} - -QTEST_MAIN(TestGpgContext) -#include "testgpgcontext.moc" diff --git a/test/todo.txt b/test/todo.txt deleted file mode 100644 index ee006991..00000000 --- a/test/todo.txt +++ /dev/null @@ -1,4 +0,0 @@ -gpgcontext.cpp: -- generateKey() should have parameters, not just a string -- constructor should have app path as param (or path to gpg binary) - -- path for keydb should be configurable separatly, for using empty db for testing |