Commit Graph

9 Commits (c6c937abc2e7e9aa9dc952dea392329b88ab1011)

Author SHA1 Message Date
Daniel Stone 3e86ebca06 Add a library of common test functions
Including creating a context (will come in useful soon), opening and
reading files, and compiling keymaps.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-07-12 14:48:22 +01:00
Daniel Stone 059c1842ef Move test data files to test/data/keymaps
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-07-12 14:14:50 +01:00
Ran Benita 010242593e test/dump: output commentary to stderr
Signed-off-by: Ran Benita <ran234@gmail.com>
2012-07-12 09:42:15 +01:00
Ran Benita d0718e988c test/dump: allow to run manually
Without the srcdir envvar (and a couple trivial changes).

Signed-off-by: Ran Benita <ran234@gmail.com>
2012-06-09 12:34:57 +03:00
Daniel Stone 77c909dee2 Fix tiny memory leak in dump test
We forgot to free the path we'd allocated with asprintf.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 16:16:20 +01:00
Daniel Stone 0f09c3073c Make xkb_map_get_as_string test more comprehensive
Add a test/dump.data file which contains the result we're expecting from
xkb_map_get_as_string run on a particularly complex set of keymaps, and
assert that the string representations are the same.  This means that
any updates to xkb_map_get_as_string will also need to update the test
data, but should also ensure that we don't have any more parser
regressions.

Compared with diff to the output of setxkbmap + xkbcomp for the same
keymap; seems completely solid.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 13:27:41 +01:00
Daniel Stone 64c277d9f2 Revert "dump"
(Ahem.)

This reverts commit f43f75fb83.
2012-06-04 13:08:01 +01:00
Daniel Stone f43f75fb83 dump 2012-06-02 15:29:21 +01:00
Daniel Stone ebd397e184 Add xkb_map_get_as_string
Returns a newly-allocated string representing the specified keymap.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-29 15:07:18 +01:00