File indexing completed on 2024-09-22 04:47:56

0001 /*
0002     SPDX-FileCopyrightText: 2015 Volker Krause <vkrause@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "servertest.h"
0008 
0009 #include <QApplication>
0010 #include <QDebug>
0011 
0012 using namespace MailTransport;
0013 
0014 int main(int argc, char **argv)
0015 {
0016     if (argc <= 2) {
0017         qFatal("Usage: servertest <protocol> <hostname>");
0018     }
0019 
0020     QApplication app(argc, argv);
0021     app.setApplicationName(QStringLiteral("kmailtransport-servertest"));
0022 
0023     ServerTest test;
0024     test.setProtocol(app.arguments().at(1));
0025     test.setServer(app.arguments().at(2));
0026     test.start();
0027     QObject::connect(&test, &ServerTest::finished, &test, [](const QList<int> &encs) {
0028         qDebug() << encs;
0029         QCoreApplication::quit();
0030     });
0031     return app.exec();
0032 }