File 0002-testsuite-fix-test-keymap-test.patch of Package systemd-v237-testsuite

From 0a1126cbf20aff9fc740569e43128a0b318735e5 Mon Sep 17 00:00:00 2001
From: Sergio Lindo Mansilla <slindomansilla@suse.com>
Date: Fri, 15 Jun 2018 16:55:07 +0200
Subject: [PATCH 02/11] testsuite: fix test-keymap test

---
 src/locale/test-keymap-util.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/locale/test-keymap-util.c b/src/locale/test-keymap-util.c
index fa26a0294..8450e5dee 100644
--- a/src/locale/test-keymap-util.c
+++ b/src/locale/test-keymap-util.c
@@ -110,9 +110,9 @@ static void test_vconsole_convert_to_x11(void) {
         log_info("/* test with known variant, new mapping (es:dvorak) */");
         assert_se(free_and_strdup(&c.vc_keymap, "es-dvorak") >= 0);
 
-        assert_se(vconsole_convert_to_x11(&c) == 0); // FIXME
+        assert_se(vconsole_convert_to_x11(&c) == 1); // FIXME
         assert_se(streq(c.x11_layout, "es"));
-        assert_se(c.x11_variant == NULL); // FIXME: "dvorak"
+        assert_se(streq(c.x11_variant, "dvorak")); // FIXME: "dvorak"
 
         log_info("/* test with old mapping (fr:latin9) */");
         assert_se(free_and_strdup(&c.vc_keymap, "fr-latin9") >= 0);
@@ -188,7 +188,7 @@ static void test_x11_convert_to_vconsole(void) {
         assert_se(free_and_strdup(&c.x11_variant, NULL) >= 0);
 
         assert_se(x11_convert_to_vconsole(&c) == 1);
-        assert_se(streq(c.vc_keymap, "us"));
+        assert_se(streq(c.vc_keymap, "ruwin_alt-UTF-8"));
 
         log_info("/* test with a compound mapping (ru,us:) */");
         assert_se(free_and_strdup(&c.x11_layout, "ru,us") >= 0);
@@ -202,8 +202,8 @@ static void test_x11_convert_to_vconsole(void) {
         assert_se(free_and_strdup(&c.x11_layout, "ru") >= 0);
         assert_se(free_and_strdup(&c.x11_variant, NULL) >= 0);
 
-        assert_se(x11_convert_to_vconsole(&c) == 0);
-        assert_se(streq(c.vc_keymap, "ru"));
+        assert_se(x11_convert_to_vconsole(&c) == 1);
+        assert_se(streq(c.vc_keymap, "ru-cv_latin"));
 }
 
 int main(int argc, char **argv) {
-- 
2.13.7

openSUSE Build Service is sponsored by