Bug 628937 - gracefully handle broken schemas

Implement the first of two features requested in the bug: when
encountering a broken .xml schema file, back out the changes in that
file and continue to parse other files.

This prevents a single broken .xml file from messing up GSettings for
everyone else.

Add a --strict option to get the old behaviour.  Use this from the test
cases.
This commit is contained in:
Ryan Lortie
2010-09-27 10:27:11 -04:00
parent fff6814973
commit e40f3932dd
2 changed files with 73 additions and 19 deletions

View File

@@ -22,6 +22,7 @@ test_schema (gpointer data)
gchar *path = g_build_filename (SRCDIR, "schema-tests", filename, NULL);
gchar *argv[] = {
"../glib-compile-schemas",
"--strict",
"--dry-run",
"--schema-file", path,
(gchar *)test->opt,