mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-04-14 13:30:46 +02:00
quirks: add missing modification warning to a quirks file
And add a test to make sure we don't forget this in the future.
Fixes: 488c0c9645 ("quirks: add quirk for the Wareus B15")
Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1464>
This commit is contained in:
parent
356c498fd4
commit
8c06ceecb2
2 changed files with 10 additions and 0 deletions
|
|
@ -1,3 +1,5 @@
|
|||
# Do not edit this file, it will be overwritten on update
|
||||
|
||||
# Clickpad that announces BTN_RIGHT
|
||||
[Wareus B15 Touchpad]
|
||||
MatchName=HTIX5288:00 36B6:C001 Touchpad
|
||||
|
|
|
|||
|
|
@ -44,6 +44,14 @@ def pytest_generate_tests(metafunc):
|
|||
metafunc.parametrize("quirksfile", [f for f in quirksdir().glob("*.quirks")])
|
||||
|
||||
|
||||
def test_has_modification_warning(quirksfile):
|
||||
with open(quirksfile) as f:
|
||||
first_line = f.readline().strip()
|
||||
assert first_line == "# Do not edit this file, it will be overwritten on update", (
|
||||
f"missing header in file {quirksfile}"
|
||||
)
|
||||
|
||||
|
||||
def test_matches_are_valid(quirksfile):
|
||||
quirks = configparser.ConfigParser(strict=True)
|
||||
# Don't convert to lowercase
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue