tools: add a test program to parse the commandline options
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 13 Jul 2020 05:38:50 +0000 (15:38 +1000)
committerRan Benita <ran@unusedvar.com>
Sat, 25 Jul 2020 08:05:14 +0000 (11:05 +0300)
commitd480f053d2ffa9202b8632efa4817bce9c97f1e9
treecee56385a0e0ecaf1ee291e080ca9c038ad8b3eb
parent449ed2b8e83121ac8c322f15ca494ee7e4c4331a
tools: add a test program to parse the commandline options

A pytest wrapper around our xkbcli tool - copied from libinput.
This calls our various xkbcli tools with varying options and check that they
either succeed or return the right error code. The coverage is limited, it
does not (and cannot) test for all possible combinations but it should provide a
good red flag if we have inconsistent behavior or accidentally break some
combination of flags.

Meanwhile, we can at least assume that all our commandline arguments are parsed
without segfaulting or worse.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
meson.build
tools/test-tool-option-parsing.py [new file with mode: 0755]