diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2023-06-29 09:39:04 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2023-07-06 09:11:50 +1000 |
commit | c8d76c4357b92cc291d82197bb99d3adff6494be (patch) | |
tree | ceab6a7d1138febcd7100d7f7052e550416e4973 | |
parent | 34509105db85dc3e0fca22076fded8607485529b (diff) |
test: comment the group name comparison test
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | tests/reg2ll.xsl | 10 | ||||
-rwxr-xr-x | tests/verify-group-names.sh | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/reg2ll.xsl b/tests/reg2ll.xsl index 598eb0fc..3a074943 100644 --- a/tests/reg2ll.xsl +++ b/tests/reg2ll.xsl @@ -7,6 +7,16 @@ doctype-system="xkb.dtd" indent="no"/> + <!-- convert the base.xml format's content into a + list of layout(variant):"name" lines, e.g. + af:"Dari" + af(fa-olpc):"Dari (Afghanistan, OLPC)" + af(ps-olpc):"Pashto (Afghanistan, OLPC)" + af(ps):"Pashto" + af(uz-olpc):"Uzbek (Afghanistan, OLPC)" + af(uz):"Uzbek (Afghanistan)" + --> + <xsl:template match="modelList|optionList|name|description|shortDescription|configItem"/> <xsl:strip-space elements="*"/> diff --git a/tests/verify-group-names.sh b/tests/verify-group-names.sh index 4969adb4..34dc5af4 100755 --- a/tests/verify-group-names.sh +++ b/tests/verify-group-names.sh @@ -19,15 +19,21 @@ group_names=grp_names.lst registry_names_base=${registry_names}.base registry_names_extras=${registry_names}.extras +# Convert base.xml and base.extras.xml to a list of `layout(variant):"blah blah"` lines xsltproc "$ROOT"/tests/reg2ll.xsl "$ROOT"/rules/base.xml > $registry_names_base xsltproc "$ROOT"/tests/reg2ll.xsl "$ROOT"/rules/base.extras.xml | grep -v sun_type > $registry_names_extras +# Filter out empty lines and the custom layout cat $registry_names_base $registry_names_extras | \ sort | \ uniq | \ grep -v -e '^$' \ -e '^custom:' > $registry_names +# Now search each symbols file for xkb_symbols "variant" and the description of +# name[Group1]="blah blah" and print out a line `filename(variant):"blah blah"`. +# Ideally that file should then match the base{.extras}.xml extracted names, i.e. +# the two files are in sync. for sym in "$ROOT"/symbols/*; do if [ -f "$sym" ]; then id="$(basename "$sym")" |