Commit Graph

8 Commits (536cf42704cc15b377a25a7fb101a48631c3700f)

Author SHA1 Message Date
Ran Benita f9858bf5b9 test: move mkdir & mkdtemp calls to common place and fix them on MSVC
Signed-off-by: Ran Benita <ran@unusedvar.com>
2022-09-24 12:31:53 +03:00
Peter Hutterer 1c8ef9e0a5 test: add test for variant inheritance of ISO 639/3166 codes
See efa9962432
2022-02-04 12:30:27 +02:00
M Hickford efa9962432
Variants should inherit iso639, iso3166 and brief from parent layout if omitted (#266) 2022-01-24 11:16:08 +10:00
Peter Hutterer 9b05825e53 registry: skip over invalid ISO639 or ISO3166 entries
If the XML file is somehow off, don't load entries that are against the spec.
2022-01-24 10:44:31 +10:00
Peter Hutterer 694b8f7127 test: fix missing va_end in case of test failures
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-03-19 23:44:30 +02:00
Peter Hutterer 13745014c3 test: include unstd.h in the registry test to cut down the MacOS warnings
mkdtmp, rmdir and unlink are in unstd.h on MacOS. Since including that it
doesn't hurt us on Linux, let's do it without ifdefs.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-09-07 22:01:57 +03:00
Peter Hutterer 41a7c975f8 Add asprintf_safe helper function
We only ever care about whether we error out or not, so let's wrap this into
something more sane.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-13 18:41:00 +10:00
Peter Hutterer afb26e7df9 Add libxkbregistry to query available RMLVO
This library is the replacement for clients parsing evdev.xml directly.
Instead, they should use the API here so that in the future we may even
be able to swap evdev.xml for a more suitable data format.

The library parses through evdev.xml (using libxml2) and - if requested -
through evdev.extras.xml as well. The merge approach is optimised for
the default case where we have a system-installed rules XML and another file in
$XDG_CONFIG_DIR that adds a few entries.  We load the system file first, then
append any custom ones to that. It's not possible to overwrite the MLVO list
provided by the system files - if you want to do that, get the change upstream.

XML validation is handled through the DTD itself which means we only need to
check for a nonempty name, everything else the DTD validation should complain
about.

The logging system is effectively identical to xkbcommon.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-06 15:15:20 +10:00