glib-compile-schema: Don't accept duplicate docs

This schema compiler was completely ignoring <summary> and
<description> tags. Unfortunately, there are modules out there
who merge translations for these back in, with xml:lang. And
this is giving dconf-editor a hard time. Since this is not
how translations of schemas are meant to be done, just
reject such schema files.

Also add tests exercising the new error handling.

https://bugzilla.gnome.org/show_bug.cgi?id=747209
This commit is contained in:
Matthias Clasen
2015-04-01 18:55:54 -04:00
parent 6ba363b619
commit b2734d762f
5 changed files with 55 additions and 2 deletions

View File

@@ -126,6 +126,8 @@ static const SchemaTest tests[] = {
{ "flags-more-than-one-bit", NULL, "*flags values must have at most 1 bit set*" },
{ "flags-with-enum-attr", NULL, "*<enum id='flags'> not (yet) defined*" },
{ "flags-with-enum-tag", NULL, "*<flags id='flags'> not (yet) defined*" },
{ "summary-xmllang", NULL, "*Only one <summary> element allowed*" },
{ "description-xmllang", NULL, "*Only one <description> element allowed*" },
{ "inherit-gettext-domain", NULL, NULL },
{ "range-type-test", NULL, NULL },
{ "cdata", NULL, NULL }