diff options
author | svu <svu> | 2005-01-15 01:57:03 +0000 |
---|---|---|
committer | svu <svu> | 2005-01-15 01:57:03 +0000 |
commit | 290f15c4d670ca8a2021ed8b18f82d90ea676bef (patch) | |
tree | 50930f434061f4cb062c64e31662859f3b10caef | |
parent | 953df727d3f53b111b75cbf6ceb854ed3d07e0e0 (diff) | |
download | xkeyboard-config-290f15c4d670ca8a2021ed8b18f82d90ea676bef.tar.gz |
improved testing for the new group naming convention
-rwxr-xr-x | tests/genLists4Comparizon.sh | 27 | ||||
-rw-r--r-- | xslt/reg2ll.xsl | 2 |
2 files changed, 26 insertions, 3 deletions
diff --git a/tests/genLists4Comparizon.sh b/tests/genLists4Comparizon.sh index 62f1718..ba3221d 100755 --- a/tests/genLists4Comparizon.sh +++ b/tests/genLists4Comparizon.sh @@ -9,8 +9,31 @@ xsltproc $ROOT/xslt/reg2ll.xsl $ROOT/rules/base.xml | sort | uniq > $F1 for i in $ROOT/symbols/*; do if [ -f $i ]; then id="`basename $i`" - gawk 'BEGIN{FS="\""}/^[[:space:]]*name\[Group1\][[:space:]]*=/{print $2;}' $i | while read name; do - echo "$id:\"$name\"" + gawk 'BEGIN{ + FS="\"" + isDefault=0; +} +/.*default.*/{ + isDefault=1; +} +/xkb_symbols/{ + variant=$2; +}/^[[:space:]]*name\[Group1\][[:space:]]*=/{ + if (isDefault==1) + { + printf "___ %s\n",$2; + isDefault=0; + } else + { + printf "%s %s\n",variant,$2; + } +}' $i | while read var name; do + # read one variable! + if [ "${var}" == "___" ]; then + echo "${id}:\"${name}\"" + else + echo "${id}(${var}):\"${name}\"" + fi done fi done | sort | uniq > $F2 diff --git a/xslt/reg2ll.xsl b/xslt/reg2ll.xsl index f6a8258..a71d330 100644 --- a/xslt/reg2ll.xsl +++ b/xslt/reg2ll.xsl @@ -18,6 +18,6 @@ </xsl:text><xsl:value-of select="./configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"<xsl:apply-templates match="./variantList/variant"/></xsl:template> <xsl:template match="variant"><xsl:text> -</xsl:text><xsl:value-of select="../../configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"</xsl:template> +</xsl:text><xsl:value-of select="../../configItem/name"/>(<xsl:value-of select="./configItem/name"/>):"<xsl:value-of select="../../configItem/description"/> - <xsl:value-of select="./configItem/description"/>"</xsl:template> </xsl:stylesheet> |