Add Plasma task group shortcuts
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
#include "../keyboardlayout.h"
|
||||
|
||||
#include <QTest>
|
||||
|
||||
class KeyboardLayoutTest : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private Q_SLOTS:
|
||||
void mapsNumberRow();
|
||||
void rejectsInvalidNumber();
|
||||
};
|
||||
|
||||
void KeyboardLayoutTest::mapsNumberRow()
|
||||
{
|
||||
QCOMPARE(numberRowKey(u"se", u"", 1, false).value(), Qt::Key_1);
|
||||
QCOMPARE(numberRowKey(u"se", u"", 1, true).value(), Qt::Key_Exclam);
|
||||
QCOMPARE(numberRowKey(u"se", u"", 4, true).value(), Qt::Key_currency);
|
||||
QCOMPARE(numberRowKey(u"us", u"", 2, true).value(), Qt::Key_At);
|
||||
QCOMPARE(numberRowKey(u"de", u"", 7, true).value(), Qt::Key_Slash);
|
||||
QCOMPARE(numberRowKey(u"fr", u"", 1, false).value(), Qt::Key_Ampersand);
|
||||
QCOMPARE(numberRowKey(u"fr", u"", 1, true).value(), Qt::Key_1);
|
||||
}
|
||||
|
||||
void KeyboardLayoutTest::rejectsInvalidNumber()
|
||||
{
|
||||
QVERIFY(!numberRowKey(u"se", u"", 0, false));
|
||||
QVERIFY(!numberRowKey(u"se", u"", 10, true));
|
||||
}
|
||||
|
||||
QTEST_GUILESS_MAIN(KeyboardLayoutTest)
|
||||
|
||||
#include "test-keyboardlayout.moc"
|
||||
Reference in New Issue
Block a user