diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-05-22 22:43:12 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-06-06 09:22:33 -0400 |
commit | 5ad327dda2b863697cf5cdc0b1724aed96c5397a (patch) | |
tree | 6c8f3ff0ad0010877bf726786fc68b1f0a8c4e29 /src/locale/test-keymap-util.c | |
parent | 6f3287b346fdcef4e1b5dd4aaeae1ee47e49e94d (diff) |
localed: also report when we couldn't convert X11→console
Rework the code a bit where find_converted_keymap cannot (and should not) be
called with a null layout, so streq can be used instead of streq_ptr, etc.
Note that the behaviour of vconsole_convert_to_x11 and x11_convert_to_vconsole
is not symmetrical. When the latter cannot find a match, it simply makes the
vconsole mapping empty. But vconsole_convert_to_x11 leaves the x11 layout
unchanged. I don't know what the proper solution is here, so I'm just adding
more verbose logging without changing the logic.
Diffstat (limited to 'src/locale/test-keymap-util.c')
-rw-r--r-- | src/locale/test-keymap-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/locale/test-keymap-util.c b/src/locale/test-keymap-util.c index 680aae6228..8dde764a50 100644 --- a/src/locale/test-keymap-util.c +++ b/src/locale/test-keymap-util.c @@ -84,11 +84,11 @@ static void test_find_legacy_keymap(void) { assert_se(ans == NULL); c.x11_layout = (char*) "pl"; - assert_se(find_legacy_keymap(&c, &ans) == 0); /* should this be 1? */ + assert_se(find_legacy_keymap(&c, &ans) == 1); assert_se(streq(ans, "pl2")); c.x11_layout = (char*) "pl,ru"; - assert_se(find_legacy_keymap(&c, &ans2) == 0); /* should this be 1? */ + assert_se(find_legacy_keymap(&c, &ans2) == 1); assert_se(streq(ans, "pl2")); } |