@@ -109,6 +109,18 @@ private Q_SLOTS:
109109
110110 /* Passthrough test */
111111 QTest::newRow("Passthrough") << "fine" << "fine";
112+
113+ /* Number as first characeter */
114+ QTest::newRow("Number first") << "31337" << "_331337";
115+
116+ /* Underscore test */
117+ QTest::newRow("Underscore test") << "this_is_c_style_namespacing" << "this_5Fis_5Fc_5Fstyle_5Fnamespacing";
118+
119+ /* Hyphen test */
120+ QTest::newRow("Hyphen test") << "typical-application" << "typical_2Dapplication";
121+
122+ /* Japanese test */
123+ QTest::newRow("日本語 test") << "日本語" << "_65_E5_67_2C_8A_9E";
112124 }
113125
114126 void testDbusName() {
@@ -118,7 +130,7 @@ private Q_SLOTS:
118130 QString decodeOut = LauncherBackend::decodeAppId(encoded);
119131 QCOMPARE(decoded, decodeOut);
120132
121− QString encodeOut = LauncherBackend::encodeAppId(encoded);
133+ QString encodeOut = LauncherBackend::encodeAppId(decoded);
122134 QCOMPARE(encoded, encodeOut);
123135 }
124136};