diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-10 19:14:35 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-10 19:44:23 +0200 |
commit | a05fbc17c58bc53f9c4bb1326d02a8e43204b87b (patch) | |
tree | bba7f3d8dd927032b46a736b92b28013898115aa /test | |
parent | 9197eb0fb38ae7e1c70e085b67305c2171f50aac (diff) |
stringcomp: test compilation of a dump of a keymap created from rules
This would have caught the regression fixed in 2ac319c.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/stringcomp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/stringcomp.c b/test/stringcomp.c index e93791a..7d13340 100644 --- a/test/stringcomp.c +++ b/test/stringcomp.c @@ -72,6 +72,18 @@ main(int argc, char *argv[]) keymap = test_compile_string(ctx, ""); assert(!keymap); + /* Make sure we can recompile our output for a normal keymap from rules. */ + keymap = test_compile_rules(ctx, NULL, NULL, + "ru,ca,de,us", ",multix,neo,intl", NULL); + assert(keymap); + dump = xkb_keymap_get_as_string(keymap, XKB_KEYMAP_USE_ORIGINAL_FORMAT); + assert(dump); + xkb_keymap_unref(keymap); + keymap = test_compile_string(ctx, dump); + assert(keymap); + xkb_keymap_unref(keymap); + free(dump); + xkb_context_unref(ctx); return 0; |