Commit a3c3c64c authored by Kurt Hindenburg's avatar Kurt Hindenburg

Add dbus environment calls to test

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=1085190
parent a1d0a1d3
......@@ -110,6 +110,7 @@ void DBusTest::testSessions()
QDBusReply<void> voidReply;
QDBusReply<bool> boolReply;
QDBusReply<QByteArray> arrayReply;
QDBusReply<QStringList> listReply;
QVERIFY(_iface);
QVERIFY(_iface->isValid());
......@@ -183,6 +184,27 @@ void DBusTest::testSessions()
QVERIFY(boolReply.isValid());
QCOMPARE(boolReply.value(), false);
//****************** Test is/set environment
listReply = iface.call("environment");
QVERIFY(listReply.isValid());
QStringList prevEnv = listReply.value();
//for (int i = 0; i < prevEnv.size(); ++i)
// kDebug()<< prevEnv.at(i).toLocal8Bit().constData() << endl;
voidReply = iface.call("setEnvironment", QStringList());
QVERIFY(voidReply.isValid());
listReply = iface.call("environment");
QVERIFY(listReply.isValid());
QCOMPARE(listReply.value(), QStringList());
voidReply = iface.call("setEnvironment", prevEnv);
QVERIFY(voidReply.isValid());
listReply = iface.call("environment");
QVERIFY(listReply.isValid());
QCOMPARE(listReply.value(), prevEnv);
}
QTEST_MAIN(DBusTest)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment