summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Add flags to context creationDaniel Stone2012-05-085-6/+6
| | | | | | None defined as yet, but why not. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add flags to keymap compilation entrypointsDaniel Stone2012-05-084-5/+5
| | | | | | No use as yet, but might as well ... Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Rename XKBcommonint.h to xkb-priv.h and use itRan Benita2012-05-081-1/+1
| | | | | | | | | | Make the files in the src/* directory use their own header or a consilidated private header. This makes the file dependencies clearer. Also drop the pointless "xkb" file name prefix, add split a few declarations to their own files (atom.h and text.h). Signed-off-by: Ran Benita <ran234@gmail.com>
* Remove left over filecomp.sh fileRan Benita2012-05-081-30/+0
| | | | | | Should have removed it in a previous commit. Signed-off-by: Ran Benita <ran234@gmail.com>
* Update .gitignore for automake 1.12Ran Benita2012-05-081-0/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Uncomment sections of test/rulescomp.cRan Benita2012-05-081-4/+0
| | | | | | | Fixes an 'unused' warning. There seems to be nothing wrong with these sections though, all the tests pass. Signed-off-by: Ran Benita <ran234@gmail.com>
* Remove unused 'which' and 'merge' argumentsRan Benita2012-05-011-1/+5
| | | | | | Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_desc -> xkb_keymap changes.]
* Overhaul test suiteRan Benita2012-04-0918-405/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite all of the current tests in the following ways: - Instead of the current mix of C and shell, just use single-process pure C file per test. All of the .sh files are removed, but everything that was tested is ported. - Instead of handling the test logs ourselves, use Automake's "parallel-test" mechanism. This will create a single log file for each test with it's stdout+stderr, and a top level "test-suite.log" file for all the failed tests. - The "parallel-tests" directive also makes the test run in parallel, so "make check" runs faster. - Also use the "color-tests" directive to have the "make check" output colorized. Who doesn't like to see PASS in green? - All of the test data files are moved into the test/data subdirectory. That way we can just put the directory in EXTRA_DIST and forget about it. - The test/Makefile.am file is consolidated into the main Makefile.am, for a completely non-recursive build. Right now the tests are completely independent and just use simple assert()'s. More sophistication can be added as needed. It should also be noted that it's still possible to use shell, python, etc. if a test wants more flexibility than C can provide, just do as before. Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: Updated for xkb_keymap changes.]
* Rename xkb_desc to xkb_keymapDaniel Stone2012-04-094-6/+6
| | | | | | | struct xkb_desc was just a hangover from the old XkbDescRec, which isn't a very descriptive name. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Tests: Release context on failure to build keymapDaniel Stone2012-03-293-0/+3
| | | | | | | No practical effect since they exit(1) regardless, but it keeps valgrind happy. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Use xkb_contexts in keymap compilationDaniel Stone2012-03-274-9/+34
| | | | | | Primarily for the include path, but also for the logging in future. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add new context APIDaniel Stone2012-03-274-1/+62
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Fix distcheck with non-recursive MakefilesDaniel Stone2012-03-271-1/+0
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Make build non-recursiveRan Benita2012-03-271-2/+2
| | | | | | | | | | | | | Unify all the different Makefile.am into a single short top level one (the test/Makefile.am file is left intact though). This makes the build system simpler to look and should encourage unifying more currently-disparate code. Some further motivation can be found in this page: http://www.flameeyes.eu/autotools-mythbuster/automake/nonrecursive.html Signed-off-by: Ran Benita <ran234@gmail.com>
* Define our own NoSymbol value and use itRan Benita2012-03-271-2/+1
| | | | | | | Since we have our own xkb_keysym_t type, it makes sense to have our own NoSymbol value instead of the one from X11/X.h. Signed-off-by: Ran Benita <ran234@gmail.com>
* Define our own None atom valueRan Benita2012-03-274-7/+0
| | | | | | | Since we define our own xkb_atom_t type, it makes sense not to use the X11/X.h None value. This way we can also remove a lot of X11 includes. Signed-off-by: Ran Benita <ran234@gmail.com>
* Remove useless stuff from utilsRan Benita2012-03-271-0/+4
| | | | | | | Signed-off-by: Ran Benita <ran234@gmail.com> [daniels: fixed conflicts from strcasecmp, added includes to make filecomp build again]
* Move utils.{c,h} to be used by the entire projectRan Benita2012-03-274-4/+4
| | | | | | | This is a first step for making consistent use of utils.h also outside of xkbcomp/ . Signed-off-by: Ran Benita <ran234@gmail.com>
* Remove a few remaining uses of the KeySym typeRan Benita2012-03-271-3/+4
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Add xkb test file to EXTRA_DISTRan Benita2012-03-271-1/+2
| | | | | | To appease make distcheck. Signed-off-by: Ran Benita <ran234@gmail.com>
* Update gitignore for 'state' testRan Benita2012-03-271-0/+1
| | | | Signed-off-by: Ran Benita <ran234@gmail.com>
* Add enum xkb_key_direction instead of boolDaniel Stone2012-03-271-11/+11
| | | | | | | Use XKB_KEY_UP instead of 0 and XKB_KEY_DOWN instead of 1. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reported-by: Ran Benita <ran234@gmail.com>
* Add state serialisation APIDaniel Stone2012-03-271-22/+78
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Rename keymap allocation APIDaniel Stone2012-03-226-46/+25
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add LED state APIDaniel Stone2012-03-221-11/+28
| | | | | | | And also convert state.c to use the state API for mods and groups, rather than testing the state members directly. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Round out new state APIDaniel Stone2012-03-212-13/+75
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add new state APIDaniel Stone2012-03-212-1/+105
| | | | | | | | | | | | | | | | | | | | Add new API to deal with xkb_state objects, including xkb_state_update_key, which runs the XKB action machinery internally to calculate what exactly happens to the state when a given key is pressed or released. The canonical way to deal with keys is now: struct xkb_state *state = xkb_state_new(xkb); xkb_keysym_t *syms; int num_syms; xkb_state_update_key(state, key, is_down); num_syms = xkb_key_get_syms(state, key, &syms); More state handling API, including a way to get at or ignore preserved modifiers, is on its way. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add geometry testDaniel Stone2012-03-152-0/+1814
| | | | | | | Add the dump of my full current X11/XKB keymap as a test for filecomp, being as it also includes geometry. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* filecomp: Fix xkbcomp warningDaniel Stone2012-03-091-1/+1
| | | | | | | Ironically, the test for named.xkb included a call that relied on the default keymap, without the file naming an explicit default. Go figure. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Remove geometry support, againDaniel Stone2012-03-094-39/+33
| | | | | | It still parses geometry, but happily throws it away. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* makekeys: update to match the rest of libX11 makekeysRan Benita2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This integrates two commits from libX11: ebd6ef0a4db0ddef0ae17ad14571518ccdeea5ba XStringToKeysym: Special case for XF86 keysyms Some XFree86 keysyms were in XKeysymDB as XF86_foo, despite really being XF86foo. So, if we get to the bottom of XStringToKeysym and haven't found our XF86_foo, try it again as XF86foo. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> 00175397480b76d32bf82b0c7c94c91a2a95954e makekeys: Scan vendor keysyms as well as core Since we can't really live without vendor keysyms, scan them all in to generate ks_tables.h, rather than only doing the core ones, and leaving the vendor syms to be manually synchronised with XKeysymDB. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Notice that the xkey.sh test is changed to match libX11 behavior, i.e. XKeysymToString(0x1008FE20) -> "XF86Ungrab" as opposed to "XF86_Ungrab". Signed-off-by: Ran Benita <ran234@gmail.com>
* tests: Free returned XKB mapDaniel Stone2012-02-153-0/+6
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Introduce xkb_keycode_t for keycodesDaniel Stone2012-02-151-1/+0
| | | | | | | And use it consistently everywhere, including with a special long-safe internal keycode type, to ease the transition to large keycodes. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Move include path from X11/extensions/ to xkbcommon/Daniel Stone2012-02-155-5/+5
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* config: distribute the .sh test programs and test dataGaetan Nadon2010-12-181-0/+7
| | | | | | | | The test programs and the test data are required in the tarball and needed for distcheck. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: make it easier to add TEST programsGaetan Nadon2010-12-181-16/+2
| | | | | | | | LDADD is a Makefile wide variable. Automake matches prog name with .c file by default Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: replace deprecated INCLUDES with AM_CPPFLAGSGaetan Nadon2010-12-081-1/+1
| | | | | | | | Fixes automake warning. Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* config: update subdirs .gitignoreGaetan Nadon2010-12-071-0/+1
| | | | Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
* Use flex for generating the scanner, add support for parsing from stringsKristian Høgsberg2010-10-201-4/+19
| | | | Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* Don't return a static buffer in public APIKristian Høgsberg2010-10-081-2/+4
|
* Rename XkbRMLVOSet to struct xkb_rule_namesKristian Høgsberg2010-07-021-1/+1
|
* Rename public entry points to lowercase and underscoreKristian Høgsberg2010-07-025-6/+6
|
* Compile with -fvisibility=hidden when possibleKristian Høgsberg2010-07-023-6/+0
|
* Pull in enough structs and defines from XKBstr.h to only need XKB.hKristian Høgsberg2010-07-024-11/+5
| | | | | We want to move away from sharing implementation structs and let libX11 and libxkbcommon use each their own set of structs.
* Make XkbcInitAtoms() call optionalKristian Høgsberg2010-06-303-3/+0
|
* Allow external atom databasesDaniel Stone2010-06-223-3/+3
| | | | | | | | | Allow people to plug in an external atom database (e.g. the X server's), so we don't have to migrate our own atoms over later. We are a bit over-keen on atoms at the moment, so it does pollute the atom database a bit though. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Add testcase for XkbcCanonicaliseComponentsDaniel Stone2010-06-223-2/+149
| | | | | | | Should be reasonably thorough; the shell part is, however, quite unpleasant. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* Test: Keysym: Add tests for new keysym <-> string conversionsDaniel Stone2010-06-221-0/+3
| | | | Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* KeySym: Actually handle NoSymbolDaniel Stone2009-04-251-1/+2
| | | | | | | | | Add NoSymbol into the keysym table, so keysym <-> string conversion works for that, too; also eliminate special-casing of VoidSymbol. This will require special-casing in libX11 to preserve its API. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
* test: Fix srcdir != objdir build and test failuresDaniel Stone2009-04-252-9/+9
| | | | | | | filecomp would fail because it couldn't find the input files, after compilation failed due to missing includes. Signed-off-by: Daniel Stone <daniel@fooishbar.org>