Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 84175043 authored by Martin Flöser's avatar Martin Flöser

Fix KeyboardLayoutTest::testNumLock

Summary:
The layout from previous test leaked into this test if all tests are run
together. This change ensures that a proper layout for this test is set.

Test Plan: Test passes alone and when run together

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D16903
parent fb68e162
......@@ -462,7 +462,15 @@ void KeyboardLayoutTest::testApplicationPolicy()
void KeyboardLayoutTest::testNumLock()
{
qputenv("KWIN_FORCE_NUM_LOCK_EVALUATION", "1");
KConfigGroup layoutGroup = kwinApp()->kxkbConfig()->group("Layout");
layoutGroup.writeEntry("LayoutList", QStringLiteral("us"));
layoutGroup.sync();
reconfigureLayouts();
auto xkb = input()->keyboard()->xkb();
QTRY_COMPARE(xkb->numberOfLayouts(), 1u);
QTRY_COMPARE(xkb->layoutName(), QStringLiteral("English (US)"));
// by default not set
QVERIFY(!xkb->modifiers().testFlag(Qt::KeypadModifier));
quint32 timestamp = 0;
......
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