diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-04-02 11:23:37 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-04-02 11:23:37 +0000 |
commit | b721254769212d671a4729f1c88b059979b80efc (patch) | |
tree | 31ec396f3488f579309ba729e6d756026b40ccc0 /test/filecomp.c | |
parent | bb620df7aa98c129687382e4866e643b8482fc59 (diff) | |
parent | 27a11762abbf0dbeb6d406fee4eee89229b6a660 (diff) | |
download | xorg-lib-libxkbcommon-b721254769212d671a4729f1c88b059979b80efc.tar.gz |
Merge tag 'xkbcommon-0.3.0' into baserock/genivi/baselinebaserock/genivi/baseline
Bug fixes and minor API tweaks.
Diffstat (limited to 'test/filecomp.c')
-rw-r--r-- | test/filecomp.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/filecomp.c b/test/filecomp.c index 0c1111a..0e41dea 100644 --- a/test/filecomp.c +++ b/test/filecomp.c @@ -38,7 +38,7 @@ test_file(struct xkb_context *ctx, const char *path_rel) int main(void) { - struct xkb_context *ctx = test_get_context(); + struct xkb_context *ctx = test_get_context(0); assert(test_file(ctx, "keymaps/basic.xkb")); assert(test_file(ctx, "keymaps/comprehensive-plus-geom.xkb")); @@ -48,6 +48,15 @@ main(void) assert(!test_file(ctx, "keymaps/bad.xkb")); assert(!test_file(ctx, "does not exist")); + /* Test response to invalid flags and formats. */ + fclose(stdin); + assert(!xkb_keymap_new_from_file(ctx, NULL, XKB_KEYMAP_FORMAT_TEXT_V1, 0)); + assert(!xkb_keymap_new_from_file(ctx, stdin, 0, 0)); + assert(!xkb_keymap_new_from_file(ctx, stdin, XKB_KEYMAP_USE_ORIGINAL_FORMAT, 0)); + assert(!xkb_keymap_new_from_file(ctx, stdin, 1234, 0)); + assert(!xkb_keymap_new_from_file(ctx, stdin, XKB_KEYMAP_FORMAT_TEXT_V1, -1)); + assert(!xkb_keymap_new_from_file(ctx, stdin, XKB_KEYMAP_FORMAT_TEXT_V1, 1234)); + xkb_context_unref(ctx); return 0; |