2020-08-02 22:22:19 +00:00
|
|
|
/*
|
|
|
|
KWin - the KDE window manager
|
|
|
|
This file is part of the KDE project.
|
2016-07-04 07:09:03 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-FileCopyrightText: 2016 Martin Gräßlin <mgraesslin@kde.org>
|
2016-07-04 07:09:03 +00:00
|
|
|
|
2020-08-02 22:22:19 +00:00
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2016-07-04 07:09:03 +00:00
|
|
|
#include "kwin_wayland_test.h"
|
|
|
|
#include "wayland_server.h"
|
|
|
|
|
|
|
|
using namespace KWin;
|
|
|
|
|
|
|
|
static const QString s_socketName = QStringLiteral("wayland_test_kwin_no_xdg_runtime_dir-0");
|
|
|
|
|
|
|
|
class NoXdgRuntimeDirTest : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
private Q_SLOTS:
|
|
|
|
void initTestCase();
|
|
|
|
void testInitFails();
|
|
|
|
};
|
|
|
|
|
|
|
|
void NoXdgRuntimeDirTest::initTestCase()
|
|
|
|
{
|
|
|
|
qunsetenv("XDG_RUNTIME_DIR");
|
|
|
|
}
|
|
|
|
|
|
|
|
void NoXdgRuntimeDirTest::testInitFails()
|
|
|
|
{
|
2020-07-07 09:45:55 +00:00
|
|
|
// this test verifies that without an XDG_RUNTIME_DIR the WaylandServer fails to start
|
2020-11-17 13:26:01 +00:00
|
|
|
QVERIFY(!waylandServer()->init(s_socketName.toLocal8Bit()));
|
2016-07-04 07:09:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
WAYLANDTEST_MAIN(NoXdgRuntimeDirTest)
|
|
|
|
#include "no_xdg_runtime_dir_test.moc"
|